1 | import { ApolloLink } from 'apollo-link';
|
2 | import { GraphQLFieldResolver, GraphQLSchema, ExecutionResult, GraphQLResolveInfo, DocumentNode, BuildSchemaOptions } from 'graphql';
|
3 | import { Options as PrintSchemaOptions } from 'graphql/utilities/schemaPrinter';
|
4 | export declare type ResolverFn = (rootValue?: any, args?: any, context?: any, info?: GraphQLResolveInfo) => AsyncIterator<any>;
|
5 | export declare type Fetcher = (operation: FetcherOperation) => Promise<ExecutionResult>;
|
6 | export declare type FetcherOperation = {
|
7 | query: DocumentNode;
|
8 | operationName?: string;
|
9 | variables?: {
|
10 | [key: string]: any;
|
11 | };
|
12 | context?: {
|
13 | [key: string]: any;
|
14 | };
|
15 | };
|
16 | export default function makeRemoteExecutableSchema({ schema, link, fetcher, createResolver: customCreateResolver, buildSchemaOptions, printSchemaOptions }: {
|
17 | schema: GraphQLSchema | string;
|
18 | link?: ApolloLink;
|
19 | fetcher?: Fetcher;
|
20 | createResolver?: (fetcher: Fetcher) => GraphQLFieldResolver<any, any>;
|
21 | buildSchemaOptions?: BuildSchemaOptions;
|
22 | printSchemaOptions?: PrintSchemaOptions;
|
23 | }): GraphQLSchema;
|
24 | export declare function createResolver(fetcher: Fetcher): GraphQLFieldResolver<any, any>;
|