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 | declare namespace PersistedQueryLink {
|
11 | type Options = {
|
12 | generateHash?: (document: DocumentNode) => string;
|
13 | disable?: (error: ErrorResponse) => boolean;
|
14 | useGETForHashedQueries?: boolean;
|
15 | };
|
16 | }
|
17 | export declare const defaultGenerateHash: (query: DocumentNode) => string;
|
18 | export declare const defaultOptions: {
|
19 | generateHash: (query: DocumentNode) => string;
|
20 | disable: ({ graphQLErrors, operation }: ErrorResponse) => boolean;
|
21 | useGETForHashedQueries: boolean;
|
22 | };
|
23 | export declare const createPersistedQueryLink: (options?: PersistedQueryLink.Options) => ApolloLink;
|
24 | export {};
|