1 | import { IdValue } from 'apollo-utilities';
|
2 | import { Cache } from 'apollo-cache';
|
3 | import { ReadStoreContext, DiffQueryAgainstStoreOptions, ReadQueryOptions, StoreObject } from './types';
|
4 | import { KeyTrie } from 'optimism';
|
5 | export declare type VariableMap = {
|
6 | [name: string]: any;
|
7 | };
|
8 | export declare type FragmentMatcher = (rootValue: any, typeCondition: string, context: ReadStoreContext) => boolean | 'heuristic';
|
9 | export declare type ExecResultMissingField = {
|
10 | object: StoreObject;
|
11 | fieldName: string;
|
12 | tolerable: boolean;
|
13 | };
|
14 | export declare type ExecResult<R = any> = {
|
15 | result: R;
|
16 | missing?: ExecResultMissingField[];
|
17 | };
|
18 | export interface StoreReaderConfig {
|
19 | cacheKeyRoot?: KeyTrie<object>;
|
20 | freezeResults?: boolean;
|
21 | }
|
22 | export declare class StoreReader {
|
23 | private freezeResults;
|
24 | constructor({ cacheKeyRoot, freezeResults, }?: StoreReaderConfig);
|
25 | readQueryFromStore<QueryType>(options: ReadQueryOptions): QueryType | undefined;
|
26 | diffQueryAgainstStore<T>({ store, query, variables, previousResult, returnPartialData, rootId, fragmentMatcherFunction, config, }: DiffQueryAgainstStoreOptions): Cache.DiffResult<T>;
|
27 | private executeStoreQuery;
|
28 | private executeSelectionSet;
|
29 | private executeField;
|
30 | private combineExecResults;
|
31 | private executeSubSelectedArray;
|
32 | }
|
33 | export declare function assertIdValue(idValue: IdValue): void;
|
34 | //# sourceMappingURL=readFromStore.d.ts.map |
\ | No newline at end of file |