1 | import { DocumentNode, FieldNode, DirectiveNode, FragmentDefinitionNode, ArgumentNode, FragmentSpreadNode, VariableDefinitionNode, ASTNode } from 'graphql';
|
2 | export type RemoveNodeConfig<N> = {
|
3 | name?: string;
|
4 | test?: (node: N) => boolean;
|
5 | remove?: boolean;
|
6 | };
|
7 | export type GetNodeConfig<N> = {
|
8 | name?: string;
|
9 | test?: (node: N) => boolean;
|
10 | };
|
11 | export type RemoveDirectiveConfig = RemoveNodeConfig<DirectiveNode>;
|
12 | export type GetDirectiveConfig = GetNodeConfig<DirectiveNode>;
|
13 | export type RemoveArgumentsConfig = RemoveNodeConfig<ArgumentNode>;
|
14 | export type GetFragmentSpreadConfig = GetNodeConfig<FragmentSpreadNode>;
|
15 | export type RemoveFragmentSpreadConfig = RemoveNodeConfig<FragmentSpreadNode>;
|
16 | export type RemoveFragmentDefinitionConfig = RemoveNodeConfig<FragmentDefinitionNode>;
|
17 | export type RemoveVariableDefinitionConfig = RemoveNodeConfig<VariableDefinitionNode>;
|
18 | export declare function removeDirectivesFromDocument(directives: RemoveDirectiveConfig[], doc: DocumentNode): DocumentNode | null;
|
19 | export declare const addTypenameToDocument: (<TNode extends ASTNode>(doc: TNode) => TNode) & {
|
20 | added(field: FieldNode): boolean;
|
21 | };
|
22 | export declare function removeConnectionDirectiveFromDocument(doc: DocumentNode): DocumentNode | null;
|
23 | export declare function removeArgumentsFromDocument(config: RemoveArgumentsConfig[], doc: DocumentNode): DocumentNode | null;
|
24 | export declare function removeFragmentSpreadFromDocument(config: RemoveFragmentSpreadConfig[], doc: DocumentNode): DocumentNode | null;
|
25 | export declare function buildQueryFromSelectionSet(document: DocumentNode): DocumentNode;
|
26 | export declare function removeClientSetsFromDocument(document: DocumentNode): DocumentNode | null;
|
27 | //# sourceMappingURL=transform.d.ts.map |
\ | No newline at end of file |