UNPKG

973 BTypeScriptView Raw
1/// <reference types="chai" />
2/// <reference types="node" />
3/// <reference types="typed-graphql" />
4import { ApolloAction } from '../actions';
5import { FragmentMap } from '../queries/getFromAST';
6import { SelectionSet, GraphQLError } from 'graphql';
7export interface QueryStore {
8 [queryId: string]: QueryStoreValue;
9}
10export interface QueryStoreValue {
11 queryString: string;
12 query: SelectionSetWithRoot;
13 minimizedQueryString: string;
14 minimizedQuery: SelectionSetWithRoot;
15 variables: Object;
16 previousVariables: Object;
17 loading: boolean;
18 stopped: boolean;
19 networkError: Error;
20 graphQLErrors: GraphQLError[];
21 forceFetch: boolean;
22 returnPartialData: boolean;
23 lastRequestId: number;
24 fragmentMap: FragmentMap;
25}
26export interface SelectionSetWithRoot {
27 id: string;
28 typeName: string;
29 selectionSet: SelectionSet;
30}
31export declare function queries(previousState: QueryStore, action: ApolloAction): QueryStore;