UNPKG

461 BTypeScriptView Raw
1import { ASTNode } from '../language/ast';
2import { GraphQLError } from './GraphQLError';
3
4/**
5 * Given an arbitrary Error, presumably thrown while attempting to execute a
6 * GraphQL operation, produce a new GraphQLError aware of the location in the
7 * document responsible for the original Error.
8 */
9export function locatedError(
10 originalError: Error | GraphQLError,
11 nodes: ReadonlyArray<ASTNode>,
12 path: ReadonlyArray<string | number>,
13): GraphQLError;