diff --git a/types/graphql/error/GraphQLError.d.ts b/types/graphql/error/GraphQLError.d.ts index 116f17c3fa..abcc6be5b9 100644 --- a/types/graphql/error/GraphQLError.d.ts +++ b/types/graphql/error/GraphQLError.d.ts @@ -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, originalError?: Error, + extensions?: { [key: string]: any }, ); }