Skip to content

Commit

Permalink
GraphQLError: switch constructor overload order (#3514)
Browse files Browse the repository at this point in the history
  • Loading branch information
glasser committed Mar 23, 2022
1 parent da57238 commit e1726df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/error/GraphQLError.ts
Expand Up @@ -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.
*/
Expand All @@ -123,7 +124,6 @@ export class GraphQLError extends Error {
originalError?: Maybe<Error & { readonly extensions?: unknown }>,
extensions?: Maybe<GraphQLErrorExtensions>,
);
constructor(message: string, args?: GraphQLErrorArgs);
constructor(message: string, ...rawArgs: BackwardsCompatibleArgs) {
const { nodes, source, positions, path, originalError, extensions } =
toNormalizedArgs(rawArgs);
Expand Down

0 comments on commit e1726df

Please sign in to comment.