1 | import { DocumentNode, ExecutionResult, GraphQLError } from 'graphql';
|
2 | import { ApolloLink, Operation } from '../core';
|
3 | import { NetworkError } from '../../errors';
|
4 | export declare const VERSION = 1;
|
5 | export interface ErrorResponse {
|
6 | graphQLErrors?: readonly GraphQLError[];
|
7 | networkError?: NetworkError;
|
8 | response?: ExecutionResult;
|
9 | operation: Operation;
|
10 | }
|
11 | type SHA256Function = (...args: any[]) => string | PromiseLike<string>;
|
12 | type GenerateHashFunction = (document: DocumentNode) => string | PromiseLike<string>;
|
13 | export declare namespace PersistedQueryLink {
|
14 | interface BaseOptions {
|
15 | disable?: (error: ErrorResponse) => boolean;
|
16 | useGETForHashedQueries?: boolean;
|
17 | }
|
18 | interface SHA256Options extends BaseOptions {
|
19 | sha256: SHA256Function;
|
20 | generateHash?: never;
|
21 | }
|
22 | interface GenerateHashOptions extends BaseOptions {
|
23 | sha256?: never;
|
24 | generateHash: GenerateHashFunction;
|
25 | }
|
26 | export type Options = SHA256Options | GenerateHashOptions;
|
27 | export {};
|
28 | }
|
29 | export declare const createPersistedQueryLink: (options: PersistedQueryLink.Options) => ApolloLink;
|
30 | export {};
|
31 |
|
\ | No newline at end of file |