UNPKG

974 BTypeScriptView Raw
1import '../utilities/globals';
2import { GraphQLError } from 'graphql';
3import { ServerParseError } from '../link/http';
4import { ServerError } from '../link/utils';
5export declare function isApolloError(err: Error): err is ApolloError;
6export type GraphQLErrors = ReadonlyArray<GraphQLError>;
7export type NetworkError = Error | ServerParseError | ServerError | null;
8export declare class ApolloError extends Error {
9 name: string;
10 message: string;
11 graphQLErrors: GraphQLErrors;
12 clientErrors: ReadonlyArray<Error>;
13 networkError: Error | ServerParseError | ServerError | null;
14 extraInfo: any;
15 constructor({ graphQLErrors, clientErrors, networkError, errorMessage, extraInfo, }: {
16 graphQLErrors?: ReadonlyArray<GraphQLError>;
17 clientErrors?: ReadonlyArray<Error>;
18 networkError?: Error | ServerParseError | ServerError | null;
19 errorMessage?: string;
20 extraInfo?: any;
21 });
22}
23//# sourceMappingURL=index.d.ts.map
\No newline at end of file