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.
@@ -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 GraphQLErrorArgs {
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, args?: GraphQLErrorArgs);
78
+ constructor(message: string, options?: GraphQLErrorOptions);
79
79
  /**
80
- * @deprecated Please use the `GraphQLErrorArgs` constructor overload instead.
80
+ * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
81
81
  */
82
82
  constructor(
83
83
  message: string,
@@ -13,7 +13,7 @@ var _location = require('../language/location.js');
13
13
 
14
14
  var _printLocation = require('../language/printLocation.js');
15
15
 
16
- function toNormalizedArgs(args) {
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 `GraphQLErrorArgs` constructor overload instead.
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
- toNormalizedArgs(rawArgs);
89
+ toNormalizedOptions(rawArgs);
90
90
  super(message);
91
91
  this.name = 'GraphQLError';
92
92
  this.path = path !== null && path !== void 0 ? path : undefined;
@@ -5,7 +5,7 @@ import {
5
5
  printSourceLocation,
6
6
  } from '../language/printLocation.mjs';
7
7
 
8
- function toNormalizedArgs(args) {
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 `GraphQLErrorArgs` constructor overload instead.
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
- toNormalizedArgs(rawArgs);
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
@@ -1,5 +1,6 @@
1
1
  export { GraphQLError, printError, formatError } from './GraphQLError';
2
2
  export type {
3
+ GraphQLErrorOptions,
3
4
  GraphQLFormattedError,
4
5
  GraphQLErrorExtensions,
5
6
  } from './GraphQLError';
package/index.d.ts CHANGED
@@ -346,6 +346,7 @@ export {
346
346
  formatError,
347
347
  } from './error/index';
348
348
  export type {
349
+ GraphQLErrorOptions,
349
350
  GraphQLFormattedError,
350
351
  GraphQLErrorExtensions,
351
352
  } from './error/index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql",
3
- "version": "16.4.0",
3
+ "version": "16.5.0",
4
4
  "description": "A Query Language and Runtime which can target any service.",
5
5
  "license": "MIT",
6
6
  "main": "index",
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.4.0';
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: 4,
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.4.0';
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: 4,
14
+ minor: 5,
15
15
  patch: 0,
16
16
  preReleaseTag: null,
17
17
  });