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