summaryrefslogtreecommitdiff
path: root/school/node_modules/graphql/error/locatedError.d.ts
blob: 869375709420d44709778e488326aff6dca51fd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { Maybe } from '../jsutils/Maybe';

import { ASTNode } from '../language/ast';

import { GraphQLError } from './GraphQLError';

/**
 * Given an arbitrary value, presumably thrown while attempting to execute a
 * GraphQL operation, produce a new GraphQLError aware of the location in the
 * document responsible for the original Error.
 */
export function locatedError(
  rawOriginalError: any,
  nodes: ASTNode | ReadonlyArray<ASTNode> | undefined,
  path?: Maybe<ReadonlyArray<string | number>>,
): GraphQLError;