1 | import type { DirectiveNode, FieldNode, VariableNode, InlineFragmentNode, ValueNode, SelectionNode, NameNode, SelectionSetNode, DocumentNode } from "graphql";
|
2 | import type { FragmentMap } from "./fragments.js";
|
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 type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object;
|
9 | export interface StoreObject {
|
10 | __typename?: string;
|
11 | [storeFieldName: string]: StoreValue;
|
12 | }
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export type AsStoreObject<T extends {
|
28 | __typename?: string;
|
29 | }> = {
|
30 | [K in keyof T]: T[K];
|
31 | };
|
32 | export declare function isDocumentNode(value: any): value is DocumentNode;
|
33 | export declare function valueToObjectRepresentation(argObj: any, name: NameNode, value: ValueNode, variables?: Object): void;
|
34 | export declare function storeKeyNameFromField(field: FieldNode, variables?: Object): string;
|
35 | export type Directives = {
|
36 | [directiveName: string]: {
|
37 | [argName: string]: any;
|
38 | };
|
39 | };
|
40 | declare let storeKeyNameStringify: (value: any) => string;
|
41 | export declare const getStoreKeyName: ((fieldName: string, args?: Record<string, any> | null, directives?: Directives) => string) & {
|
42 | setStringify(s: typeof storeKeyNameStringify): (value: any) => string;
|
43 | };
|
44 | export declare function argumentsObjectFromField(field: FieldNode | DirectiveNode, variables?: Record<string, any>): Object | null;
|
45 | export declare function resultKeyNameFromField(field: FieldNode): string;
|
46 | export declare function getTypenameFromResult(result: Record<string, any>, selectionSet: SelectionSetNode, fragmentMap?: FragmentMap): string | undefined;
|
47 | export declare function isField(selection: SelectionNode): selection is FieldNode;
|
48 | export declare function isInlineFragment(selection: SelectionNode): selection is InlineFragmentNode;
|
49 | export type VariableValue = (node: VariableNode) => any;
|
50 | export {};
|
51 |
|
\ | No newline at end of file |