Merge pull request #24447 from pobed2/patch-1

[graphql] Add `extensions` to GraphQLError
This commit is contained in:
Mine Starks
2018-03-21 14:16:09 -07:00
committed by GitHub

View File

@@ -56,6 +56,11 @@ export class GraphQLError extends Error {
* The original error thrown from a field resolver during execution.
*/
originalError?: Error;
/**
* Extension fields to add to the formatted error.
*/
extensions?: { [key: string]: any } | undefined;
constructor(
message: string,
@@ -64,5 +69,6 @@ export class GraphQLError extends Error {
positions?: number[],
path?: Array<string | number>,
originalError?: Error,
extensions?: { [key: string]: any },
);
}