1 | import { DirectiveNode, FieldNode, VariableNode, InlineFragmentNode, ValueNode, SelectionNode, NameNode, SelectionSetNode, DocumentNode } from 'graphql';
|
2 | import { FragmentMap } from './fragments';
|
3 | export interface Reference {
|
4 | readonly __ref: string;
|
5 | }
|
6 | export declare function makeReference(id: string): Reference;
|
7 | export declare function isReference(obj: any): obj is Reference;
|
8 | export declare type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object;
|
9 | export interface StoreObject {
|
10 | __typename?: string;
|
11 | [storeFieldName: string]: StoreValue;
|
12 | }
|
13 | export declare function isDocumentNode(value: any): value is DocumentNode;
|
14 | export declare function valueToObjectRepresentation(argObj: any, name: NameNode, value: ValueNode, variables?: Object): void;
|
15 | export declare function storeKeyNameFromField(field: FieldNode, variables?: Object): string;
|
16 | export declare type Directives = {
|
17 | [directiveName: string]: {
|
18 | [argName: string]: any;
|
19 | };
|
20 | };
|
21 | export declare const getStoreKeyName: ((fieldName: string, args?: Record<string, any> | null, directives?: Directives) => string) & {
|
22 | setStringify(s: typeof stringify): (value: any) => string;
|
23 | };
|
24 | declare let stringify: (value: any) => string;
|
25 | export declare function argumentsObjectFromField(field: FieldNode | DirectiveNode, variables?: Record<string, any>): Object | null;
|
26 | export declare function resultKeyNameFromField(field: FieldNode): string;
|
27 | export declare function getTypenameFromResult(result: Record<string, any>, selectionSet: SelectionSetNode, fragmentMap?: FragmentMap): string | undefined;
|
28 | export declare function isField(selection: SelectionNode): selection is FieldNode;
|
29 | export declare function isInlineFragment(selection: SelectionNode): selection is InlineFragmentNode;
|
30 | export declare type VariableValue = (node: VariableNode) => any;
|
31 | export {};
|
32 |
|
\ | No newline at end of file |