The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild

Products

Hive logoHive blurred logo

Hive

Schema Registry for your GraphQL Workflows

Envelop Logo

Envelop

Get Started

Plugin Hub > useAsyncSchema

yarn add @envelop/core

useAsyncSchema#

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