1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- import Maybe from '../tsutils/Maybe';
- import { DocumentNode } from '../language/ast';
- import {
- ExecutionResult,
- ExecutionResultDataDefault,
- } from '../execution/execute';
- import { GraphQLSchema } from '../type/schema';
- import { GraphQLFieldResolver } from '../type/definition';
- export interface SubscriptionArgs {
- schema: GraphQLSchema;
- document: DocumentNode;
- rootValue?: any;
- contextValue?: any;
- variableValues?: Maybe<Record<string, any>>;
- operationName?: Maybe<string>;
- fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>;
- subscribeFieldResolver?: Maybe<GraphQLFieldResolver<any, any>>;
- }
- export function subscribe<TData = ExecutionResultDataDefault>(
- args: SubscriptionArgs,
- ): Promise<
- AsyncIterableIterator<ExecutionResult<TData>> | ExecutionResult<TData>
- >;
- export function subscribe<TData = ExecutionResultDataDefault>(
- schema: GraphQLSchema,
- document: DocumentNode,
- rootValue?: any,
- contextValue?: any,
- variableValues?: Maybe<{ [key: string]: any }>,
- operationName?: Maybe<string>,
- fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>,
- subscribeFieldResolver?: Maybe<GraphQLFieldResolver<any, any>>,
- ): Promise<
- AsyncIterableIterator<ExecutionResult<TData>> | ExecutionResult<TData>
- >;
- export function createSourceEventStream<TData = ExecutionResultDataDefault>(
- schema: GraphQLSchema,
- document: DocumentNode,
- rootValue?: any,
- contextValue?: any,
- variableValues?: { [key: string]: any },
- operationName?: Maybe<string>,
- fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>,
- ): Promise<AsyncIterable<any> | ExecutionResult<TData>>;
|