The Guild LogoThe Guild Monogram
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

Edit on GitHub