1 | import { DocumentNode, GraphQLError } from 'graphql';
|
2 | import { QueryStoreValue } from '../data/queries';
|
3 | import { NetworkStatus } from './networkStatus';
|
4 | import { FetchResult } from 'apollo-link';
|
5 | export declare type QueryListener = (queryStoreValue: QueryStoreValue, newData?: any) => void;
|
6 | export declare type OperationVariables = {
|
7 | [key: string]: any;
|
8 | };
|
9 | export declare type PureQueryOptions = {
|
10 | query: DocumentNode;
|
11 | variables?: {
|
12 | [key: string]: any;
|
13 | };
|
14 | context?: any;
|
15 | };
|
16 | export declare type ApolloQueryResult<T> = {
|
17 | data: T;
|
18 | errors?: GraphQLError[];
|
19 | loading: boolean;
|
20 | networkStatus: NetworkStatus;
|
21 | stale: boolean;
|
22 | };
|
23 | export declare enum FetchType {
|
24 | normal = 1,
|
25 | refetch = 2,
|
26 | poll = 3
|
27 | }
|
28 | export declare type MutationQueryReducer<T> = (previousResult: Record<string, any>, options: {
|
29 | mutationResult: FetchResult<T>;
|
30 | queryName: string | undefined;
|
31 | queryVariables: Record<string, any>;
|
32 | }) => Record<string, any>;
|
33 | export declare type MutationQueryReducersMap<T = {
|
34 | [key: string]: any;
|
35 | }> = {
|
36 | [queryName: string]: MutationQueryReducer<T>;
|
37 | };
|
38 |
|
\ | No newline at end of file |