UNPKG

990 BTypeScriptView Raw
1import { GraphQLResolveInfo, GraphQLSchema } from 'graphql';
2import { IResolvers } from 'graphql-tools/dist/Interfaces';
3import { BindingOptions, Options, QueryOrMutation } from './types';
4export declare class Delegate {
5 schema: GraphQLSchema;
6 before: () => void;
7 disableCache: boolean;
8 private fragmentReplacements;
9 constructor({ schema, fragmentReplacements, before, disableCache, }: BindingOptions);
10 request<T = any>(query: string, variables?: {
11 [key: string]: any;
12 }): Promise<T>;
13 delegate(operation: QueryOrMutation, fieldName: string, args: {
14 [key: string]: any;
15 }, infoOrQuery?: GraphQLResolveInfo | string, options?: Options): Promise<any>;
16 delegateSubscription(fieldName: string, args?: {
17 [key: string]: any;
18 }, infoOrQuery?: GraphQLResolveInfo | string, options?: Options): Promise<AsyncIterator<any>>;
19 getAbstractResolvers(filterSchema?: GraphQLSchema | string): IResolvers;
20 private delegateToSchema;
21}