graphql 16.4.0 → 16.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/error/GraphQLError.d.ts +3 -3
- package/error/GraphQLError.js +3 -3
- package/error/GraphQLError.mjs +3 -3
- package/error/index.d.ts +1 -0
- package/index.d.ts +1 -0
- package/package.json +1 -1
- package/version.js +2 -2
- package/version.mjs +2 -2
package/error/GraphQLError.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type { Source } from '../language/source';
|
|
|
14
14
|
export interface GraphQLErrorExtensions {
|
|
15
15
|
[attributeName: string]: unknown;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface GraphQLErrorOptions {
|
|
18
18
|
nodes?: ReadonlyArray<ASTNode> | ASTNode | null;
|
|
19
19
|
source?: Maybe<Source>;
|
|
20
20
|
positions?: Maybe<ReadonlyArray<number>>;
|
|
@@ -75,9 +75,9 @@ export declare class GraphQLError extends Error {
|
|
|
75
75
|
* Extension fields to add to the formatted error.
|
|
76
76
|
*/
|
|
77
77
|
readonly extensions: GraphQLErrorExtensions;
|
|
78
|
-
constructor(message: string,
|
|
78
|
+
constructor(message: string, options?: GraphQLErrorOptions);
|
|
79
79
|
/**
|
|
80
|
-
* @deprecated Please use the `
|
|
80
|
+
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
|
|
81
81
|
*/
|
|
82
82
|
constructor(
|
|
83
83
|
message: string,
|
package/error/GraphQLError.js
CHANGED
|
@@ -13,7 +13,7 @@ var _location = require('../language/location.js');
|
|
|
13
13
|
|
|
14
14
|
var _printLocation = require('../language/printLocation.js');
|
|
15
15
|
|
|
16
|
-
function
|
|
16
|
+
function toNormalizedOptions(args) {
|
|
17
17
|
const firstArg = args[0];
|
|
18
18
|
|
|
19
19
|
if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {
|
|
@@ -80,13 +80,13 @@ class GraphQLError extends Error {
|
|
|
80
80
|
*/
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
|
-
* @deprecated Please use the `
|
|
83
|
+
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
|
|
84
84
|
*/
|
|
85
85
|
constructor(message, ...rawArgs) {
|
|
86
86
|
var _this$nodes, _nodeLocations$, _ref;
|
|
87
87
|
|
|
88
88
|
const { nodes, source, positions, path, originalError, extensions } =
|
|
89
|
-
|
|
89
|
+
toNormalizedOptions(rawArgs);
|
|
90
90
|
super(message);
|
|
91
91
|
this.name = 'GraphQLError';
|
|
92
92
|
this.path = path !== null && path !== void 0 ? path : undefined;
|
package/error/GraphQLError.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
printSourceLocation,
|
|
6
6
|
} from '../language/printLocation.mjs';
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
function toNormalizedOptions(args) {
|
|
9
9
|
const firstArg = args[0];
|
|
10
10
|
|
|
11
11
|
if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {
|
|
@@ -72,13 +72,13 @@ export class GraphQLError extends Error {
|
|
|
72
72
|
*/
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
* @deprecated Please use the `
|
|
75
|
+
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
|
|
76
76
|
*/
|
|
77
77
|
constructor(message, ...rawArgs) {
|
|
78
78
|
var _this$nodes, _nodeLocations$, _ref;
|
|
79
79
|
|
|
80
80
|
const { nodes, source, positions, path, originalError, extensions } =
|
|
81
|
-
|
|
81
|
+
toNormalizedOptions(rawArgs);
|
|
82
82
|
super(message);
|
|
83
83
|
this.name = 'GraphQLError';
|
|
84
84
|
this.path = path !== null && path !== void 0 ? path : undefined;
|
package/error/index.d.ts
CHANGED
package/index.d.ts
CHANGED
package/package.json
CHANGED
package/version.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.versionInfo = exports.version = void 0;
|
|
|
10
10
|
/**
|
|
11
11
|
* A string containing the version of the GraphQL.js library
|
|
12
12
|
*/
|
|
13
|
-
const version = '16.
|
|
13
|
+
const version = '16.5.0';
|
|
14
14
|
/**
|
|
15
15
|
* An object containing the components of the GraphQL.js version string
|
|
16
16
|
*/
|
|
@@ -18,7 +18,7 @@ const version = '16.4.0';
|
|
|
18
18
|
exports.version = version;
|
|
19
19
|
const versionInfo = Object.freeze({
|
|
20
20
|
major: 16,
|
|
21
|
-
minor:
|
|
21
|
+
minor: 5,
|
|
22
22
|
patch: 0,
|
|
23
23
|
preReleaseTag: null,
|
|
24
24
|
});
|
package/version.mjs
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* A string containing the version of the GraphQL.js library
|
|
6
6
|
*/
|
|
7
|
-
export const version = '16.
|
|
7
|
+
export const version = '16.5.0';
|
|
8
8
|
/**
|
|
9
9
|
* An object containing the components of the GraphQL.js version string
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
export const versionInfo = Object.freeze({
|
|
13
13
|
major: 16,
|
|
14
|
-
minor:
|
|
14
|
+
minor: 5,
|
|
15
15
|
patch: 0,
|
|
16
16
|
preReleaseTag: null,
|
|
17
17
|
});
|