1 | import { DirectiveNode, FieldNode, IntValueNode, FloatValueNode, StringValueNode, BooleanValueNode, EnumValueNode, VariableNode, InlineFragmentNode, ValueNode, SelectionNode, NameNode } from 'graphql';
|
2 | export interface IdValue {
|
3 | type: 'id';
|
4 | id: string;
|
5 | generated: boolean;
|
6 | typename: string | undefined;
|
7 | }
|
8 | export interface JsonValue {
|
9 | type: 'json';
|
10 | json: any;
|
11 | }
|
12 | export declare type ListValue = Array<null | IdValue>;
|
13 | export declare type StoreValue = number | string | string[] | IdValue | ListValue | JsonValue | null | undefined | void | Object;
|
14 | export declare type ScalarValue = StringValueNode | BooleanValueNode | EnumValueNode;
|
15 | export declare function isScalarValue(value: ValueNode): value is ScalarValue;
|
16 | export declare type NumberValue = IntValueNode | FloatValueNode;
|
17 | export declare function isNumberValue(value: ValueNode): value is NumberValue;
|
18 | export declare function valueToObjectRepresentation(argObj: any, name: NameNode, value: ValueNode, variables?: Object): void;
|
19 | export declare function storeKeyNameFromField(field: FieldNode, variables?: Object): string;
|
20 | export declare type Directives = {
|
21 | [directiveName: string]: {
|
22 | [argName: string]: any;
|
23 | };
|
24 | };
|
25 | export declare function getStoreKeyName(fieldName: string, args?: Object, directives?: Directives): string;
|
26 | export declare function argumentsObjectFromField(field: FieldNode | DirectiveNode, variables: Object): Object;
|
27 | export declare function resultKeyNameFromField(field: FieldNode): string;
|
28 | export declare function isField(selection: SelectionNode): selection is FieldNode;
|
29 | export declare function isInlineFragment(selection: SelectionNode): selection is InlineFragmentNode;
|
30 | export declare function isIdValue(idObject: StoreValue): idObject is IdValue;
|
31 | export declare type IdConfig = {
|
32 | id: string;
|
33 | typename: string | undefined;
|
34 | };
|
35 | export declare function toIdValue(idConfig: string | IdConfig, generated?: boolean): IdValue;
|
36 | export declare function isJsonValue(jsonObject: StoreValue): jsonObject is JsonValue;
|
37 | export declare type VariableValue = (node: VariableNode) => any;
|
38 | export declare function valueFromNode(node: ValueNode, onVariable?: VariableValue): any;
|
39 |
|
\ | No newline at end of file |