1 | import { GraphQLResolveInfo, GraphQLSchema } from 'graphql';
|
2 | import { Transform } from 'graphql-tools';
|
3 | export declare type Operation = 'query' | 'mutation' | 'subscription';
|
4 | export declare type QueryOrMutation = 'query' | 'mutation';
|
5 | export interface FragmentReplacement {
|
6 | field: string;
|
7 | fragment: string;
|
8 | }
|
9 | export interface QueryMap {
|
10 | [rootField: string]: (args?: {
|
11 | [key: string]: any;
|
12 | }, info?: GraphQLResolveInfo | string, context?: {
|
13 | [key: string]: any;
|
14 | }) => Promise<any>;
|
15 | }
|
16 | export declare type MutationMap = QueryMap;
|
17 | export interface SubscriptionMap {
|
18 | [rootField: string]: (args?: any, info?: GraphQLResolveInfo | string, context?: {
|
19 | [key: string]: any;
|
20 | }) => AsyncIterator<any> | Promise<AsyncIterator<any>>;
|
21 | }
|
22 | export interface BindingOptions {
|
23 | fragmentReplacements?: FragmentReplacement[];
|
24 | schema: GraphQLSchema;
|
25 | before?: () => void;
|
26 | disableCache?: boolean;
|
27 | }
|
28 | export interface BindingWithoutSchemaOptions {
|
29 | fragmentReplacements?: FragmentReplacement[];
|
30 | before?: () => void;
|
31 | }
|
32 | export interface Args {
|
33 | [key: string]: any;
|
34 | }
|
35 | export interface Context {
|
36 | [key: string]: any;
|
37 | }
|
38 | export interface Options {
|
39 | transforms?: Transform[];
|
40 | context?: Context;
|
41 | }
|