UNPKG

graphql-yoga

Version:
21 lines (20 loc) 499 B
import { makeExecutableSchema, } from '@graphql-tools/schema'; export function createSchema(opts) { return makeExecutableSchema({ ...opts, typeDefs: [ /* GraphQL */ ` directive @defer( if: Boolean label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT directive @stream( if: Boolean label: String initialCount: Int = 0 ) on FIELD `, opts.typeDefs, ], }); }