graphql 14.5.3 → 14.5.4

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.
@@ -2,7 +2,9 @@ import Maybe from '../tsutils/Maybe';
2
2
  import { PromiseOrValue } from '../jsutils/PromiseOrValue';
3
3
  import { Path, addPath, pathToArray } from '../jsutils/Path';
4
4
 
5
- import { GraphQLError, locatedError } from '../error';
5
+ import { GraphQLError } from '../error/GraphQLError';
6
+ import { locatedError } from '../error/locatedError';
7
+
6
8
  import {
7
9
  DirectiveNode,
8
10
  DocumentNode,
@@ -31,7 +31,7 @@ export function getVariableValues(
31
31
  schema: GraphQLSchema,
32
32
  varDefNodes: VariableDefinitionNode[],
33
33
  inputs: { [key: string]: any },
34
- options: { maxErrors?: number },
34
+ options?: { maxErrors?: number },
35
35
  ): CoercedVariableValues;
36
36
 
37
37
  /**
package/jsutils/Path.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type Path = {
2
- prev: Path | void;
2
+ prev: Path | undefined;
3
3
  key: string | number;
4
4
  };
5
5
 
@@ -140,7 +140,7 @@ export const QueryDocumentKeys: {
140
140
  InputObjectTypeExtension: ['name', 'directives', 'fields'];
141
141
  };
142
142
 
143
- export const BREAK: {};
143
+ export const BREAK: any;
144
144
 
145
145
  /**
146
146
  * visit() will walk through an AST using a depth first traversal, calling
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "graphql",
3
- "version": "14.5.3",
3
+ "version": "14.5.4",
4
4
  "description": "A Query Language and Runtime which can target any service.",
5
5
  "license": "MIT",
6
6
  "main": "index",
7
7
  "module": "index.mjs",
8
+ "types": "index.d.ts",
8
9
  "sideEffects": false,
9
10
  "homepage": "https://github.com/graphql/graphql-js",
10
11
  "bugs": {
@@ -4,11 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
7
+ // Workaround to make older Flow versions happy
8
+ var flatMapMethod = Array.prototype.flatMap;
8
9
  /* eslint-disable no-redeclare */
9
10
  // $FlowFixMe
10
- var flatMap = Array.prototype.flatMap ? function (list, fn) {
11
- return Array.prototype.flatMap.call(list, fn);
11
+
12
+ var flatMap = flatMapMethod ? function (list, fn) {
13
+ return flatMapMethod.call(list, fn);
12
14
  } : function (list, fn) {
13
15
  var result = [];
14
16
 
@@ -5,11 +5,14 @@ declare function flatMap<T, U>(
5
5
  fn: (item: T, index: number) => $ReadOnlyArray<U> | U,
6
6
  ): Array<U>;
7
7
 
8
+ // Workaround to make older Flow versions happy
9
+ const flatMapMethod = (Array.prototype: any).flatMap;
10
+
8
11
  /* eslint-disable no-redeclare */
9
12
  // $FlowFixMe
10
- const flatMap = Array.prototype.flatMap
13
+ const flatMap = flatMapMethod
11
14
  ? function(list, fn) {
12
- return Array.prototype.flatMap.call(list, fn);
15
+ return flatMapMethod.call(list, fn);
13
16
  }
14
17
  : function(list, fn) {
15
18
  let result = [];
@@ -1,7 +1,10 @@
1
+ // Workaround to make older Flow versions happy
2
+ var flatMapMethod = Array.prototype.flatMap;
1
3
  /* eslint-disable no-redeclare */
2
4
  // $FlowFixMe
3
- var flatMap = Array.prototype.flatMap ? function (list, fn) {
4
- return Array.prototype.flatMap.call(list, fn);
5
+
6
+ var flatMap = flatMapMethod ? function (list, fn) {
7
+ return flatMapMethod.call(list, fn);
5
8
  } : function (list, fn) {
6
9
  var result = [];
7
10
 
@@ -7,9 +7,9 @@ exports.default = void 0;
7
7
 
8
8
  /* eslint-disable no-redeclare */
9
9
  // $FlowFixMe workaround for: https://github.com/facebook/flow/issues/4441
10
- var isFinite = Number.isFinite || function (value) {
10
+ var isFinitePolyfill = Number.isFinite || function (value) {
11
11
  return typeof value === 'number' && isFinite(value);
12
12
  };
13
13
 
14
- var _default = isFinite;
14
+ var _default = isFinitePolyfill;
15
15
  exports.default = _default;
@@ -1,13 +1,14 @@
1
1
  // @flow strict
2
2
 
3
- declare function isFinite(value: mixed): boolean %checks(typeof value ===
4
- 'number');
3
+ declare function isFinitePolyfill(
4
+ value: mixed,
5
+ ): boolean %checks(typeof value === 'number');
5
6
 
6
7
  /* eslint-disable no-redeclare */
7
8
  // $FlowFixMe workaround for: https://github.com/facebook/flow/issues/4441
8
- const isFinite =
9
+ const isFinitePolyfill =
9
10
  Number.isFinite ||
10
11
  function(value) {
11
12
  return typeof value === 'number' && isFinite(value);
12
13
  };
13
- export default isFinite;
14
+ export default isFinitePolyfill;
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-redeclare */
2
2
  // $FlowFixMe workaround for: https://github.com/facebook/flow/issues/4441
3
- var isFinite = Number.isFinite || function (value) {
3
+ var isFinitePolyfill = Number.isFinite || function (value) {
4
4
  return typeof value === 'number' && isFinite(value);
5
5
  };
6
6
 
7
- export default isFinite;
7
+ export default isFinitePolyfill;
@@ -1,3 +1,5 @@
1
+ import { PromiseOrValue } from '../jsutils/PromiseOrValue';
2
+
1
3
  /**
2
4
  * Given an AsyncIterable and a callback function, return an AsyncIterator
3
5
  * which produces values mapped via calling the callback function.
@@ -6,4 +8,4 @@ export default function mapAsyncIterator<T, U>(
6
8
  iterable: AsyncIterable<T>,
7
9
  callback: (arg: T) => PromiseOrValue<U>,
8
10
  rejectCallback?: (arg: any) => PromiseOrValue<U>,
9
- ): AsyncGenerator<U, void, void>;
11
+ ): any; // TS_SPECIFIC: es2018.asyncgenerator requires typescript@3.6
@@ -72,7 +72,7 @@ function () {
72
72
  description: arg.description === undefined ? null : arg.description,
73
73
  type: arg.type,
74
74
  defaultValue: arg.defaultValue,
75
- extensions: arg.extensions,
75
+ extensions: arg.extensions && (0, _toObjMap.default)(arg.extensions),
76
76
  astNode: arg.astNode
77
77
  };
78
78
  });
@@ -86,7 +86,7 @@ export class GraphQLDirective {
86
86
  description: arg.description === undefined ? null : arg.description,
87
87
  type: arg.type,
88
88
  defaultValue: arg.defaultValue,
89
- extensions: arg.extensions,
89
+ extensions: arg.extensions && toObjMap(arg.extensions),
90
90
  astNode: arg.astNode,
91
91
  }));
92
92
  }
@@ -51,7 +51,7 @@ function () {
51
51
  description: arg.description === undefined ? null : arg.description,
52
52
  type: arg.type,
53
53
  defaultValue: arg.defaultValue,
54
- extensions: arg.extensions,
54
+ extensions: arg.extensions && toObjMap(arg.extensions),
55
55
  astNode: arg.astNode
56
56
  };
57
57
  });
@@ -1,5 +1,5 @@
1
1
  import { GraphQLInputType } from '../type/definition';
2
- import { GraphQLError } from '../error';
2
+ import { GraphQLError } from '../error/GraphQLError';
3
3
 
4
4
  type OnErrorCB = (
5
5
  path: ReadonlyArray<string | number>,
@@ -1,5 +1,5 @@
1
1
  import Maybe from '../tsutils/Maybe';
2
- import { GraphQLError } from '../error';
2
+ import { GraphQLError } from '../error/GraphQLError';
3
3
  import { ASTVisitor } from '../language/visitor';
4
4
  import {
5
5
  DocumentNode,
@@ -3,7 +3,7 @@ import { SDLValidationContext } from '../ValidationContext';
3
3
 
4
4
  export function extendingUnknownTypeMessage(
5
5
  typeName: string,
6
- suggestedTypes: $ReadOnlyArray<string>,
6
+ suggestedTypes: ReadonlyArray<string>,
7
7
  ): string;
8
8
 
9
9
  export function extendingDifferentTypeKindMessage(
@@ -1,5 +1,5 @@
1
1
  import { ASTVisitor } from '../../language/visitor';
2
- import { ASTValidationContext } from '../ValidationContext';
2
+ import { SDLValidationContext } from '../ValidationContext';
3
3
 
4
4
  export function duplicateDirectiveNameMessage(directiveName: string): string;
5
5
 
@@ -1,4 +1,4 @@
1
- import { GraphQLError } from '../error';
1
+ import { GraphQLError } from '../error/GraphQLError';
2
2
  import { DocumentNode } from '../language/ast';
3
3
  import { GraphQLSchema } from '../type/schema';
4
4
  import { TypeInfo } from '../utilities/TypeInfo';
package/version.js CHANGED
@@ -13,7 +13,7 @@ exports.versionInfo = exports.version = void 0;
13
13
  /**
14
14
  * A string containing the version of the GraphQL.js library
15
15
  */
16
- var version = '14.5.3';
16
+ var version = '14.5.4';
17
17
  /**
18
18
  * An object containing the components of the GraphQL.js version string
19
19
  */
@@ -22,7 +22,7 @@ exports.version = version;
22
22
  var versionInfo = Object.freeze({
23
23
  major: 14,
24
24
  minor: 5,
25
- patch: 3,
25
+ patch: 4,
26
26
  preReleaseTag: null
27
27
  });
28
28
  exports.versionInfo = versionInfo;
package/version.js.flow CHANGED
@@ -8,7 +8,7 @@
8
8
  /**
9
9
  * A string containing the version of the GraphQL.js library
10
10
  */
11
- export const version = '14.5.3';
11
+ export const version = '14.5.4';
12
12
 
13
13
  /**
14
14
  * An object containing the components of the GraphQL.js version string
@@ -16,6 +16,6 @@ export const version = '14.5.3';
16
16
  export const versionInfo = Object.freeze({
17
17
  major: 14,
18
18
  minor: 5,
19
- patch: 3,
19
+ patch: 4,
20
20
  preReleaseTag: null,
21
21
  });
package/version.mjs CHANGED
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * A string containing the version of the GraphQL.js library
8
8
  */
9
- export var version = '14.5.3';
9
+ export var version = '14.5.4';
10
10
  /**
11
11
  * An object containing the components of the GraphQL.js version string
12
12
  */
@@ -14,6 +14,6 @@ export var version = '14.5.3';
14
14
  export var versionInfo = Object.freeze({
15
15
  major: 14,
16
16
  minor: 5,
17
- patch: 3,
17
+ patch: 4,
18
18
  preReleaseTag: null
19
19
  });