1 | import { ApolloLink, Operation } from 'apollo-link';
|
2 | import { DocumentNode, ExecutionResult, GraphQLError } from 'graphql';
|
3 | export declare const VERSION = 1;
|
4 | export interface ErrorResponse {
|
5 | graphQLErrors?: GraphQLError[];
|
6 | networkError?: Error;
|
7 | response?: ExecutionResult;
|
8 | operation: Operation;
|
9 | }
|
10 | export declare const defaultGenerateHash: (query: DocumentNode) => string;
|
11 | export declare const defaultOptions: {
|
12 | generateHash: (query: DocumentNode) => string;
|
13 | disable: ({graphQLErrors, operation}: ErrorResponse) => boolean;
|
14 | useGETForHashedQueries: boolean;
|
15 | };
|
16 | export declare const createPersistedQueryLink: (options?: {
|
17 | generateHash?: ((document: DocumentNode) => string) | undefined;
|
18 | disable?: ((error: ErrorResponse) => boolean) | undefined;
|
19 | useGETForHashedQueries?: boolean | undefined;
|
20 | }) => ApolloLink;
|