The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild


Hive logoHive blurred logo


Schema Registry for your GraphQL Workflows

Envelop Logo


Get Started

Plugin Hub > useAsyncSchema

yarn add @envelop/core


This plugin is the simplest plugin for specifying your GraphQL schema. You can specify a schema created from any tool that emits Promise<GraphQLSchema> object.

import { envelop, useAsyncSchema } from '@envelop/core'; import { buildSchema } from 'graphql'; const getSchema = async (): Promise<GraphQLSchema> => { // return schema when it's ready }; const getEnveloped = envelop({ plugins: [ useAsyncSchema(getSchema()), // ... other plugins ... ], });

Plugin Details