locatedError.d.ts 521 B

12345678910111213141516
  1. import { Maybe } from '../jsutils/Maybe';
  2. import { ASTNode } from '../language/ast';
  3. import { GraphQLError } from './GraphQLError';
  4. /**
  5. * Given an arbitrary value, 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. */
  9. export function locatedError(
  10. rawOriginalError: any,
  11. nodes: ASTNode | ReadonlyArray<ASTNode> | undefined,
  12. path?: Maybe<ReadonlyArray<string | number>>,
  13. ): GraphQLError;