1 | import { ApolloLink, Observable, Operation, NextLink, FetchResult, ExecutionResult } from 'apollo-link';
|
2 | import { GraphQLError } from 'graphql';
|
3 | import { ServerError, ServerParseError } from 'apollo-link-http-common';
|
4 | export interface ErrorResponse {
|
5 | graphQLErrors?: ReadonlyArray<GraphQLError>;
|
6 | networkError?: Error | ServerError | ServerParseError;
|
7 | response?: ExecutionResult;
|
8 | operation: Operation;
|
9 | forward: NextLink;
|
10 | }
|
11 | export declare namespace ErrorLink {
|
12 | interface ErrorHandler {
|
13 | (error: ErrorResponse): Observable<FetchResult> | void;
|
14 | }
|
15 | }
|
16 | export import ErrorHandler = ErrorLink.ErrorHandler;
|
17 | export declare function onError(errorHandler: ErrorHandler): ApolloLink;
|
18 | export declare class ErrorLink extends ApolloLink {
|
19 | private link;
|
20 | constructor(errorHandler: ErrorLink.ErrorHandler);
|
21 | request(operation: Operation, forward: NextLink): Observable<FetchResult> | null;
|
22 | }
|
23 | //# sourceMappingURL=index.d.ts.map |
\ | No newline at end of file |