UNPKG

935 BTypeScriptView Raw
1import { FieldNode, SelectionNode, DirectiveNode, DocumentNode, ArgumentNode } from 'graphql';
2export declare type DirectiveInfo = {
3 [fieldName: string]: {
4 [argName: string]: any;
5 };
6};
7export declare function getDirectiveInfoFromField(field: FieldNode, variables: Object): DirectiveInfo;
8export declare function shouldInclude(selection: SelectionNode, variables?: {
9 [name: string]: any;
10}): boolean;
11export declare function getDirectiveNames(doc: DocumentNode): string[];
12export declare function hasDirectives(names: string[], doc: DocumentNode): boolean;
13export declare function hasClientExports(document: DocumentNode): boolean;
14export declare type InclusionDirectives = Array<{
15 directive: DirectiveNode;
16 ifArgument: ArgumentNode;
17}>;
18export declare function getInclusionDirectives(directives: ReadonlyArray<DirectiveNode>): InclusionDirectives;
19//# sourceMappingURL=directives.d.ts.map
\No newline at end of file