UNPKG

@graphql-mesh/serve-runtime

Version:
10 lines (9 loc) 608 B
import type { GraphQLSchema } from 'graphql'; import { type YogaServerInstance } from 'graphql-yoga'; import { type MaybePromise } from '@graphql-tools/utils'; import type { GatewayConfig } from './types.js'; export type GatewayRuntime<TContext extends Record<string, any> = Record<string, any>> = YogaServerInstance<unknown, TContext> & { invalidateUnifiedGraph(): void; getSchema(): MaybePromise<GraphQLSchema>; } & AsyncDisposable; export declare function createGatewayRuntime<TContext extends Record<string, any> = Record<string, any>>(config: GatewayConfig<TContext>): GatewayRuntime<TContext>;