import { ASTNode, GraphQLError, GraphQLFormattedError, Source, SourceLocation } from 'graphql'; declare module 'graphql' { interface GraphQLErrorExtensions { exception?: { code?: string; stacktrace?: ReadonlyArray; }; } } export declare class ApolloError extends Error implements GraphQLError { extensions: Record; readonly name: string; readonly locations: ReadonlyArray | undefined; readonly path: ReadonlyArray | undefined; readonly source: Source | undefined; readonly positions: ReadonlyArray | undefined; readonly nodes: ReadonlyArray | undefined; originalError: Error | undefined; [key: string]: any; constructor(message: string, code?: string, extensions?: Record); toJSON(): GraphQLFormattedError; toString(): string; get [Symbol.toStringTag](): string; } 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, extensions?: Record); } export declare class ForbiddenError extends ApolloError { constructor(message: string, extensions?: Record); } export declare class PersistedQueryNotFoundError extends ApolloError { constructor(); } export declare class PersistedQueryNotSupportedError extends ApolloError { constructor(); } export declare class UserInputError extends ApolloError { constructor(message: string, extensions?: Record); } export declare function formatApolloErrors(errors: ReadonlyArray, options?: { formatter?: (error: GraphQLError) => GraphQLFormattedError; debug?: boolean; }): Array; //# sourceMappingURL=index.d.ts.map