123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- import Maybe from '../tsutils/Maybe';
- import { ASTNode } from '../language/ast';
- import { Source } from '../language/source';
- import { SourceLocation, getLocation } from '../language/location';
- export class GraphQLError extends Error {
- constructor(
- message: string,
- nodes?: ReadonlyArray<ASTNode> | ASTNode | undefined,
- source?: Maybe<Source>,
- positions?: Maybe<ReadonlyArray<number>>,
- path?: Maybe<ReadonlyArray<string | number>>,
- originalError?: Maybe<Error>,
- extensions?: Maybe<{ [key: string]: any }>,
- );
-
- message: string;
-
- readonly locations: ReadonlyArray<SourceLocation> | undefined;
-
- readonly path: ReadonlyArray<string | number> | undefined;
-
- readonly nodes: ReadonlyArray<ASTNode> | undefined;
-
- readonly source: Source | undefined;
-
- readonly positions: ReadonlyArray<number> | undefined;
-
- readonly originalError: Maybe<Error>;
-
- readonly extensions: { [key: string]: any } | undefined;
- }
- export function printError(error: GraphQLError): string;
|