import { GraphQLError, GraphQLFormattedError } from 'graphql'; export declare class ApolloError extends Error implements GraphQLError { extensions: Record; readonly name: any; readonly locations: any; readonly path: any; readonly source: any; readonly positions: any; readonly nodes: any; originalError: any; [key: string]: any; constructor(message: string, code?: string, extensions?: Record); } export declare function toApolloError(error: Error & { extensions?: Record; }, code?: string): Error & { extensions: Record; }; export interface ErrorOptions { code?: string; errorClass?: new (message: string) => ApolloError; } export declare function fromGraphQLError(error: GraphQLError, options?: ErrorOptions): ApolloError; export declare class SyntaxError extends ApolloError { constructor(message: string); } export declare class ValidationError extends ApolloError { constructor(message: string); } export declare class AuthenticationError extends ApolloError { constructor(message: string); } export declare class ForbiddenError extends ApolloError { constructor(message: string); } export declare class PersistedQueryNotFoundError extends ApolloError { constructor(); } export declare class PersistedQueryNotSupportedError extends ApolloError { constructor(); } export declare class UserInputError extends ApolloError { constructor(message: string, properties?: Record); } export declare function formatApolloErrors(errors: ReadonlyArray, options?: { formatter?: (error: GraphQLError) => GraphQLFormattedError; debug?: boolean; }): Array; export declare function hasPersistedQueryError(errors: Array): boolean; //# sourceMappingURL=index.d.ts.map