github-pages-deploy-action/node_modules/graphql/error/locatedError.d.ts

17 lines
531 B
TypeScript
Raw Normal View History

2020-03-07 11:45:40 +08:00
import Maybe from '../tsutils/Maybe';
import { ASTNode } from '../language/ast';
import { GraphQLError } from './GraphQLError';
/**
* Given an arbitrary Error, 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(
originalError: Error | GraphQLError,
nodes: ASTNode | ReadonlyArray<ASTNode> | undefined,
path?: Maybe<ReadonlyArray<string | number>>,
): GraphQLError;