mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
Fix GraphQLError optional constructor parameters (#12800)
This commit is contained in:
21
graphql/index.d.ts
vendored
21
graphql/index.d.ts
vendored
@@ -2091,7 +2091,7 @@ declare module "graphql/error/GraphQLError" {
|
||||
*
|
||||
* Enumerable, and appears in the result of JSON.stringify().
|
||||
*/
|
||||
locations: Array<{ line: number, column: number }> | void;
|
||||
locations?: Array<{ line: number, column: number }> | void;
|
||||
|
||||
/**
|
||||
* An array describing the JSON-path into the execution response which
|
||||
@@ -2099,28 +2099,37 @@ declare module "graphql/error/GraphQLError" {
|
||||
*
|
||||
* Enumerable, and appears in the result of JSON.stringify().
|
||||
*/
|
||||
path: Array<string | number> | void;
|
||||
path?: Array<string | number> | void;
|
||||
|
||||
/**
|
||||
* An array of GraphQL AST Nodes corresponding to this error.
|
||||
*/
|
||||
nodes: Array<ASTNode> | void;
|
||||
nodes?: Array<ASTNode> | void;
|
||||
|
||||
/**
|
||||
* The source GraphQL document corresponding to this error.
|
||||
*/
|
||||
source: Source | void;
|
||||
source?: Source | void;
|
||||
|
||||
/**
|
||||
* An array of character offsets within the source GraphQL document
|
||||
* which correspond to this error.
|
||||
*/
|
||||
positions: Array<number> | void;
|
||||
positions?: Array<number> | void;
|
||||
|
||||
/**
|
||||
* The original error thrown from a field resolver during execution.
|
||||
*/
|
||||
originalError: Error;
|
||||
originalError?: Error;
|
||||
|
||||
constructor(
|
||||
message: string,
|
||||
nodes?: Array<any>,
|
||||
source?: Source,
|
||||
positions?: Array<number>,
|
||||
path?: Array<string | number>,
|
||||
originalError?: Error,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user