graphql-yoga
Version:
8 lines (7 loc) • 552 B
text/typescript
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 & {
request: Request;
}) => PromiseOrValue<GraphQLSchemaWithContext<TContext>>);
export declare const useSchema: <TContext extends YogaInitialContext = YogaInitialContext>(schemaDef?: YogaSchemaDefinition<TContext> | undefined) => Plugin<TContext, {}, {}>;