locatedError.d.ts 461 B

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