diff --git a/src/error/GraphQLError.d.ts b/src/error/GraphQLError.d.ts index bb574f9f05..95f39ba483 100644 --- a/src/error/GraphQLError.d.ts +++ b/src/error/GraphQLError.d.ts @@ -76,7 +76,7 @@ export class GraphQLError extends Error { /** * The original error thrown from a field resolver during execution. */ - readonly originalError: Error | undefined; + readonly originalError: Error | undefined | null; /** * Extension fields to add to the formatted error. diff --git a/src/error/GraphQLError.js b/src/error/GraphQLError.js index 7552bb473d..d3068adacb 100644 --- a/src/error/GraphQLError.js +++ b/src/error/GraphQLError.js @@ -56,7 +56,7 @@ export class GraphQLError extends Error { /** * The original error thrown from a field resolver during execution. */ - +originalError: Error | void; + +originalError: Error | void | null; /** * Extension fields to add to the formatted error.