From 1f14091892deb50dd2faec1de87baad15ff80452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Olivier=20B=C3=A9dard?= Date: Wed, 21 Mar 2018 11:37:04 -0400 Subject: [PATCH] Add `extensions` to GraphQLError https://github.com/graphql/graphql-js/blob/master/src/error/GraphQLError.js#L89 --- types/graphql/error/GraphQLError.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) 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 }, ); }