From e1726dfea66979bfe7ad1c0b0834613e4b6ce4b4 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 23 Mar 2022 05:37:58 -0700 Subject: [PATCH] GraphQLError: switch constructor overload order (#3514) --- src/error/GraphQLError.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index c859f59e46..65a4ea3d07 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -111,6 +111,7 @@ export class GraphQLError extends Error { */ readonly extensions: GraphQLErrorExtensions; + constructor(message: string, args?: GraphQLErrorArgs); /** * @deprecated Please use the `GraphQLErrorArgs` constructor overload instead. */ @@ -123,7 +124,6 @@ export class GraphQLError extends Error { originalError?: Maybe, extensions?: Maybe, ); - constructor(message: string, args?: GraphQLErrorArgs); constructor(message: string, ...rawArgs: BackwardsCompatibleArgs) { const { nodes, source, positions, path, originalError, extensions } = toNormalizedArgs(rawArgs);