UNPKG

graphql-yoga

Version:
6 lines (5 loc) 523 B
import { PromiseOrValue } from '@envelop/core'; import type { GraphQLSchemaWithContext, YogaInitialContext } from '../types'; import type { Plugin } from './types'; export declare type YogaSchemaDefinition<TContext> = PromiseOrValue<GraphQLSchemaWithContext<TContext>> | ((context: TContext & YogaInitialContext) => PromiseOrValue<GraphQLSchemaWithContext<TContext>>); export declare const useSchema: <TContext = {}>(schemaDef?: YogaSchemaDefinition<TContext> | undefined) => Plugin<YogaInitialContext & TContext, {}, {}>;