useSchema
This plugin is the simplest plugin for specifying your GraphQL schema. You can specify a schema created from any tool that emits GraphQLSchema object.
- Package
- @envelop/core
- Weekly downloads
- 9.3M
- Version
- 5.6.1
- License
- MIT
- Updated
- Sep 16, 2026
useSchema
This plugin is the simplest plugin for specifying your GraphQL schema. You can specify a schema
created from any tool that emits GraphQLSchema object.
import { execute, parse, specifiedRules, subscribe, validate } from 'graphql'
import { envelop, useEngine, useSchema } from '@envelop/core'
const mySchema = buildSchema(/* ... */)
const getEnveloped = envelop({
plugins: [
useEngine({ parse, validate, specifiedRules, execute, subscribe }),
useSchema(mySchema)
// ... other plugins ...
]
})