1 | import { DocumentNode, GraphQLError, ExecutionResult } from 'graphql';
|
2 | import { NetworkStatus } from '../core/networkStatus';
|
3 | export declare type QueryStoreValue = {
|
4 | document: DocumentNode;
|
5 | variables: Object;
|
6 | previousVariables?: Object | null;
|
7 | networkStatus: NetworkStatus;
|
8 | networkError?: Error | null;
|
9 | graphQLErrors?: GraphQLError[];
|
10 | metadata: any;
|
11 | };
|
12 | export declare class QueryStore {
|
13 | private store;
|
14 | getStore(): {
|
15 | [queryId: string]: QueryStoreValue;
|
16 | };
|
17 | get(queryId: string): QueryStoreValue;
|
18 | initQuery(query: {
|
19 | queryId: string;
|
20 | document: DocumentNode;
|
21 | storePreviousVariables: boolean;
|
22 | variables: Object;
|
23 | isPoll: boolean;
|
24 | isRefetch: boolean;
|
25 | metadata: any;
|
26 | fetchMoreForQueryId: string | undefined;
|
27 | }): void;
|
28 | markQueryResult(queryId: string, result: ExecutionResult, fetchMoreForQueryId: string | undefined): void;
|
29 | markQueryError(queryId: string, error: Error, fetchMoreForQueryId: string | undefined): void;
|
30 | markQueryResultClient(queryId: string, complete: boolean): void;
|
31 | stopQuery(queryId: string): void;
|
32 | reset(observableQueryIds: string[]): void;
|
33 | }
|
34 |
|
\ | No newline at end of file |