1 | import { DocumentNode, FieldNode } from 'graphql';
|
2 | import { FragmentMap, DirectiveInfo } from 'apollo-utilities';
|
3 | export declare type Resolver = (fieldName: string, rootValue: any, args: any, context: any, info: ExecInfo) => any;
|
4 | export declare type VariableMap = {
|
5 | [name: string]: any;
|
6 | };
|
7 | export declare type ResultMapper = (values: {
|
8 | [fieldName: string]: any;
|
9 | }, rootValue: any) => any;
|
10 | export declare type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean;
|
11 | export declare type ExecContext = {
|
12 | fragmentMap: FragmentMap;
|
13 | contextValue: any;
|
14 | variableValues: VariableMap;
|
15 | resultMapper: ResultMapper;
|
16 | resolver: Resolver;
|
17 | fragmentMatcher: FragmentMatcher;
|
18 | };
|
19 | export declare type ExecInfo = {
|
20 | isLeaf: boolean;
|
21 | resultKey: string;
|
22 | directives: DirectiveInfo;
|
23 | field: FieldNode;
|
24 | };
|
25 | export declare type ExecOptions = {
|
26 | resultMapper?: ResultMapper;
|
27 | fragmentMatcher?: FragmentMatcher;
|
28 | };
|
29 | export declare function graphql(resolver: Resolver, document: DocumentNode, rootValue?: any, contextValue?: any, variableValues?: VariableMap, execOptions?: ExecOptions): any;
|
30 | export declare function merge(dest: any, src: any): void;
|
31 |
|
\ | No newline at end of file |