1 | import { SelectionSetNode } from 'graphql';
|
2 | import { Reference, StoreObject } from '../../utilities';
|
3 | import { Cache } from '../core/types/Cache';
|
4 | import { DiffQueryAgainstStoreOptions, InMemoryCacheConfig, ReadMergeModifyContext } from './types';
|
5 | import { InMemoryCache } from './inMemoryCache';
|
6 | import { MissingTree } from '../core/types/common';
|
7 | import { ObjectCanon } from './object-canon';
|
8 | export type VariableMap = {
|
9 | [name: string]: any;
|
10 | };
|
11 | export type ExecResult<R = any> = {
|
12 | result: R;
|
13 | missing?: MissingTree;
|
14 | };
|
15 | export interface StoreReaderConfig {
|
16 | cache: InMemoryCache;
|
17 | addTypename?: boolean;
|
18 | resultCacheMaxSize?: number;
|
19 | canonizeResults?: boolean;
|
20 | canon?: ObjectCanon;
|
21 | fragments?: InMemoryCacheConfig["fragments"];
|
22 | }
|
23 | export declare class StoreReader {
|
24 | private executeSelectionSet;
|
25 | private executeSubSelectedArray;
|
26 | private config;
|
27 | private knownResults;
|
28 | canon: ObjectCanon;
|
29 | resetCanon(): void;
|
30 | constructor(config: StoreReaderConfig);
|
31 | diffQueryAgainstStore<T>({ store, query, rootId, variables, returnPartialData, canonizeResults, }: DiffQueryAgainstStoreOptions): Cache.DiffResult<T>;
|
32 | isFresh(result: Record<string, any>, parent: StoreObject | Reference, selectionSet: SelectionSetNode, context: ReadMergeModifyContext): boolean;
|
33 | private execSelectionSetImpl;
|
34 | private execSubSelectedArrayImpl;
|
35 | }
|
36 | //# sourceMappingURL=readFromStore.d.ts.map |
\ | No newline at end of file |