graphql 14.3.0 → 14.3.1

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.
Files changed (272) hide show
  1. package/error/GraphQLError.js +12 -10
  2. package/error/GraphQLError.js.flow +7 -1
  3. package/error/GraphQLError.mjs +12 -2
  4. package/error/formatError.js +1 -1
  5. package/error/formatError.mjs +1 -1
  6. package/error/index.js +1 -1
  7. package/error/index.mjs +1 -1
  8. package/error/locatedError.js +1 -1
  9. package/error/locatedError.mjs +1 -1
  10. package/error/printError.js +1 -1
  11. package/error/printError.mjs +1 -1
  12. package/error/syntaxError.js +1 -1
  13. package/error/syntaxError.mjs +1 -1
  14. package/execution/execute.js +32 -26
  15. package/execution/execute.js.flow +6 -3
  16. package/execution/execute.mjs +32 -26
  17. package/execution/index.js +1 -1
  18. package/execution/index.mjs +1 -1
  19. package/execution/values.js +4 -4
  20. package/execution/values.js.flow +4 -3
  21. package/execution/values.mjs +4 -4
  22. package/graphql.js +6 -2
  23. package/graphql.js.flow +2 -1
  24. package/graphql.mjs +3 -2
  25. package/index.js +1 -1
  26. package/index.mjs +1 -1
  27. package/jsutils/ObjMap.js +1 -1
  28. package/jsutils/ObjMap.mjs +1 -0
  29. package/jsutils/PromiseOrValue.js +1 -1
  30. package/jsutils/PromiseOrValue.mjs +1 -0
  31. package/jsutils/dedent.js +1 -1
  32. package/jsutils/dedent.mjs +1 -1
  33. package/jsutils/defineToJSON.js +1 -1
  34. package/jsutils/defineToJSON.mjs +1 -1
  35. package/jsutils/defineToStringTag.js +1 -1
  36. package/jsutils/defineToStringTag.mjs +1 -1
  37. package/jsutils/inspect.js +2 -2
  38. package/jsutils/inspect.js.flow +1 -1
  39. package/jsutils/inspect.mjs +2 -2
  40. package/jsutils/instanceOf.js +1 -1
  41. package/jsutils/instanceOf.mjs +1 -1
  42. package/jsutils/invariant.js +4 -2
  43. package/jsutils/invariant.js.flow +2 -1
  44. package/jsutils/invariant.mjs +4 -2
  45. package/jsutils/isInvalid.js +1 -1
  46. package/jsutils/isInvalid.mjs +1 -1
  47. package/jsutils/isNullish.js +1 -1
  48. package/jsutils/isNullish.mjs +1 -1
  49. package/jsutils/isPromise.js +1 -1
  50. package/jsutils/isPromise.mjs +1 -1
  51. package/jsutils/keyMap.js +3 -2
  52. package/jsutils/keyMap.js.flow +4 -4
  53. package/jsutils/keyMap.mjs +3 -2
  54. package/jsutils/keyValMap.js +3 -2
  55. package/jsutils/keyValMap.js.flow +4 -4
  56. package/jsutils/keyValMap.mjs +3 -2
  57. package/jsutils/mapValue.js +1 -1
  58. package/jsutils/mapValue.mjs +1 -1
  59. package/jsutils/memoize3.js +2 -2
  60. package/jsutils/memoize3.js.flow +1 -1
  61. package/jsutils/memoize3.mjs +2 -2
  62. package/jsutils/nodejsCustomInspectSymbol.js +1 -1
  63. package/jsutils/nodejsCustomInspectSymbol.mjs +1 -1
  64. package/jsutils/orList.js +1 -1
  65. package/jsutils/orList.mjs +1 -1
  66. package/jsutils/promiseForObject.js +1 -1
  67. package/jsutils/promiseForObject.mjs +1 -1
  68. package/jsutils/promiseReduce.js +1 -1
  69. package/jsutils/promiseReduce.mjs +1 -1
  70. package/jsutils/quotedOrList.js +1 -1
  71. package/jsutils/quotedOrList.mjs +1 -1
  72. package/jsutils/suggestionList.js +1 -1
  73. package/jsutils/suggestionList.mjs +1 -1
  74. package/language/ast.js +1 -1
  75. package/language/ast.mjs +1 -0
  76. package/language/blockString.js +1 -1
  77. package/language/blockString.js.flow +1 -1
  78. package/language/blockString.mjs +1 -1
  79. package/language/directiveLocation.js +1 -1
  80. package/language/directiveLocation.mjs +1 -1
  81. package/language/index.js +1 -1
  82. package/language/index.mjs +1 -1
  83. package/language/kinds.js +1 -1
  84. package/language/kinds.mjs +1 -1
  85. package/language/lexer.js +11 -9
  86. package/language/lexer.js.flow +3 -1
  87. package/language/lexer.mjs +11 -9
  88. package/language/location.js +1 -1
  89. package/language/location.mjs +1 -1
  90. package/language/parser.js +2 -2
  91. package/language/parser.js.flow +1 -1
  92. package/language/parser.mjs +2 -2
  93. package/language/predicates.js +1 -1
  94. package/language/predicates.mjs +1 -1
  95. package/language/printer.js +1 -1
  96. package/language/printer.mjs +1 -1
  97. package/language/source.js +1 -1
  98. package/language/source.mjs +1 -1
  99. package/language/visitor.js +1 -1
  100. package/language/visitor.mjs +1 -1
  101. package/package.json +1 -1
  102. package/polyfills/find.js +1 -1
  103. package/polyfills/find.mjs +1 -1
  104. package/polyfills/flatMap.js +1 -1
  105. package/polyfills/flatMap.mjs +1 -1
  106. package/polyfills/isFinite.js +1 -1
  107. package/polyfills/isFinite.mjs +1 -1
  108. package/polyfills/isInteger.js +1 -1
  109. package/polyfills/isInteger.mjs +1 -1
  110. package/polyfills/objectEntries.js +1 -1
  111. package/polyfills/objectEntries.mjs +1 -1
  112. package/polyfills/objectValues.js +1 -1
  113. package/polyfills/objectValues.mjs +1 -1
  114. package/subscription/asyncIteratorReject.js +1 -1
  115. package/subscription/asyncIteratorReject.mjs +1 -1
  116. package/subscription/index.js +1 -1
  117. package/subscription/index.mjs +1 -1
  118. package/subscription/mapAsyncIterator.js +1 -1
  119. package/subscription/mapAsyncIterator.mjs +1 -1
  120. package/subscription/subscribe.js +1 -1
  121. package/subscription/subscribe.mjs +1 -1
  122. package/type/definition.js +8 -14
  123. package/type/definition.js.flow +4 -4
  124. package/type/definition.mjs +8 -14
  125. package/type/directives.js +1 -1
  126. package/type/directives.mjs +1 -1
  127. package/type/index.js +1 -1
  128. package/type/index.mjs +1 -1
  129. package/type/introspection.js +1 -1
  130. package/type/introspection.mjs +1 -1
  131. package/type/scalars.js +1 -1
  132. package/type/scalars.mjs +1 -1
  133. package/type/schema.js +3 -2
  134. package/type/schema.js.flow +4 -4
  135. package/type/schema.mjs +3 -2
  136. package/type/validate.js +1 -1
  137. package/type/validate.mjs +1 -1
  138. package/utilities/TypeInfo.js +92 -72
  139. package/utilities/TypeInfo.js.flow +18 -9
  140. package/utilities/TypeInfo.mjs +92 -72
  141. package/utilities/assertValidName.js +1 -1
  142. package/utilities/assertValidName.mjs +1 -1
  143. package/utilities/astFromValue.js +1 -1
  144. package/utilities/astFromValue.mjs +1 -1
  145. package/utilities/buildASTSchema.js +3 -1
  146. package/utilities/buildASTSchema.mjs +3 -1
  147. package/utilities/buildClientSchema.js +5 -2
  148. package/utilities/buildClientSchema.js.flow +3 -1
  149. package/utilities/buildClientSchema.mjs +5 -2
  150. package/utilities/coerceValue.js +1 -1
  151. package/utilities/coerceValue.mjs +1 -1
  152. package/utilities/concatAST.js +1 -1
  153. package/utilities/concatAST.mjs +1 -1
  154. package/utilities/extendSchema.js +1 -1
  155. package/utilities/extendSchema.mjs +1 -1
  156. package/utilities/findBreakingChanges.js +23 -34
  157. package/utilities/findBreakingChanges.js.flow +40 -34
  158. package/utilities/findBreakingChanges.mjs +49 -34
  159. package/utilities/findDeprecatedUsages.js +1 -1
  160. package/utilities/findDeprecatedUsages.mjs +1 -1
  161. package/utilities/getOperationAST.js +1 -1
  162. package/utilities/getOperationAST.mjs +1 -1
  163. package/utilities/getOperationRootType.js +23 -23
  164. package/utilities/getOperationRootType.js.flow +33 -30
  165. package/utilities/getOperationRootType.mjs +23 -23
  166. package/utilities/index.js +1 -1
  167. package/utilities/index.mjs +1 -1
  168. package/utilities/introspectionFromSchema.js +4 -2
  169. package/utilities/introspectionFromSchema.js.flow +2 -1
  170. package/utilities/introspectionFromSchema.mjs +3 -2
  171. package/utilities/introspectionQuery.js +1 -1
  172. package/utilities/introspectionQuery.mjs +1 -1
  173. package/utilities/isValidJSValue.js +1 -1
  174. package/utilities/isValidJSValue.mjs +1 -1
  175. package/utilities/isValidLiteralValue.js +1 -1
  176. package/utilities/isValidLiteralValue.mjs +1 -1
  177. package/utilities/lexicographicSortSchema.js +1 -1
  178. package/utilities/lexicographicSortSchema.mjs +1 -1
  179. package/utilities/schemaPrinter.js +1 -1
  180. package/utilities/schemaPrinter.mjs +1 -1
  181. package/utilities/separateOperations.js +1 -1
  182. package/utilities/separateOperations.mjs +1 -1
  183. package/utilities/stripIgnoredCharacters.js +7 -7
  184. package/utilities/stripIgnoredCharacters.js.flow +6 -6
  185. package/utilities/stripIgnoredCharacters.mjs +7 -7
  186. package/utilities/typeComparators.js +1 -1
  187. package/utilities/typeComparators.mjs +1 -1
  188. package/utilities/typeFromAST.js +1 -1
  189. package/utilities/typeFromAST.mjs +1 -1
  190. package/utilities/valueFromAST.js +1 -1
  191. package/utilities/valueFromAST.mjs +1 -1
  192. package/utilities/valueFromASTUntyped.js +5 -3
  193. package/utilities/valueFromASTUntyped.js.flow +2 -1
  194. package/utilities/valueFromASTUntyped.mjs +5 -3
  195. package/validation/ValidationContext.js +1 -1
  196. package/validation/ValidationContext.mjs +1 -1
  197. package/validation/index.js +1 -1
  198. package/validation/index.mjs +1 -1
  199. package/validation/rules/ExecutableDefinitions.js +1 -1
  200. package/validation/rules/ExecutableDefinitions.mjs +1 -1
  201. package/validation/rules/FieldsOnCorrectType.js +1 -1
  202. package/validation/rules/FieldsOnCorrectType.mjs +1 -1
  203. package/validation/rules/FragmentsOnCompositeTypes.js +1 -1
  204. package/validation/rules/FragmentsOnCompositeTypes.mjs +1 -1
  205. package/validation/rules/KnownArgumentNames.js +1 -1
  206. package/validation/rules/KnownArgumentNames.mjs +1 -1
  207. package/validation/rules/KnownDirectives.js +5 -3
  208. package/validation/rules/KnownDirectives.js.flow +2 -1
  209. package/validation/rules/KnownDirectives.mjs +5 -3
  210. package/validation/rules/KnownFragmentNames.js +1 -1
  211. package/validation/rules/KnownFragmentNames.mjs +1 -1
  212. package/validation/rules/KnownTypeNames.js +1 -1
  213. package/validation/rules/KnownTypeNames.mjs +1 -1
  214. package/validation/rules/LoneAnonymousOperation.js +1 -1
  215. package/validation/rules/LoneAnonymousOperation.mjs +1 -1
  216. package/validation/rules/LoneSchemaDefinition.js +1 -1
  217. package/validation/rules/LoneSchemaDefinition.mjs +1 -1
  218. package/validation/rules/NoFragmentCycles.js +1 -1
  219. package/validation/rules/NoFragmentCycles.mjs +1 -1
  220. package/validation/rules/NoUndefinedVariables.js +1 -1
  221. package/validation/rules/NoUndefinedVariables.mjs +1 -1
  222. package/validation/rules/NoUnusedFragments.js +1 -1
  223. package/validation/rules/NoUnusedFragments.mjs +1 -1
  224. package/validation/rules/NoUnusedVariables.js +1 -1
  225. package/validation/rules/NoUnusedVariables.mjs +1 -1
  226. package/validation/rules/OverlappingFieldsCanBeMerged.js +21 -16
  227. package/validation/rules/OverlappingFieldsCanBeMerged.js.flow +4 -2
  228. package/validation/rules/OverlappingFieldsCanBeMerged.mjs +21 -16
  229. package/validation/rules/PossibleFragmentSpreads.js +1 -1
  230. package/validation/rules/PossibleFragmentSpreads.mjs +1 -1
  231. package/validation/rules/PossibleTypeExtensions.js +1 -1
  232. package/validation/rules/PossibleTypeExtensions.mjs +1 -1
  233. package/validation/rules/ProvidedRequiredArguments.js +1 -1
  234. package/validation/rules/ProvidedRequiredArguments.mjs +1 -1
  235. package/validation/rules/ScalarLeafs.js +1 -1
  236. package/validation/rules/ScalarLeafs.mjs +1 -1
  237. package/validation/rules/SingleFieldSubscriptions.js +1 -1
  238. package/validation/rules/SingleFieldSubscriptions.mjs +1 -1
  239. package/validation/rules/UniqueArgumentNames.js +1 -1
  240. package/validation/rules/UniqueArgumentNames.mjs +1 -1
  241. package/validation/rules/UniqueDirectiveNames.js +1 -1
  242. package/validation/rules/UniqueDirectiveNames.mjs +1 -1
  243. package/validation/rules/UniqueDirectivesPerLocation.js +2 -1
  244. package/validation/rules/UniqueDirectivesPerLocation.mjs +2 -1
  245. package/validation/rules/UniqueEnumValueNames.js +1 -1
  246. package/validation/rules/UniqueEnumValueNames.mjs +1 -1
  247. package/validation/rules/UniqueFieldDefinitionNames.js +1 -1
  248. package/validation/rules/UniqueFieldDefinitionNames.mjs +1 -1
  249. package/validation/rules/UniqueFragmentNames.js +1 -1
  250. package/validation/rules/UniqueFragmentNames.mjs +1 -1
  251. package/validation/rules/UniqueInputFieldNames.js +1 -1
  252. package/validation/rules/UniqueInputFieldNames.mjs +1 -1
  253. package/validation/rules/UniqueOperationNames.js +1 -1
  254. package/validation/rules/UniqueOperationNames.mjs +1 -1
  255. package/validation/rules/UniqueOperationTypes.js +1 -1
  256. package/validation/rules/UniqueOperationTypes.mjs +1 -1
  257. package/validation/rules/UniqueTypeNames.js +1 -1
  258. package/validation/rules/UniqueTypeNames.mjs +1 -1
  259. package/validation/rules/UniqueVariableNames.js +1 -1
  260. package/validation/rules/UniqueVariableNames.mjs +1 -1
  261. package/validation/rules/ValuesOfCorrectType.js +1 -1
  262. package/validation/rules/ValuesOfCorrectType.mjs +1 -1
  263. package/validation/rules/VariablesAreInputTypes.js +1 -1
  264. package/validation/rules/VariablesAreInputTypes.mjs +1 -1
  265. package/validation/rules/VariablesInAllowedPosition.js +2 -2
  266. package/validation/rules/VariablesInAllowedPosition.js.flow +1 -1
  267. package/validation/rules/VariablesInAllowedPosition.mjs +2 -2
  268. package/validation/specifiedRules.js +1 -1
  269. package/validation/specifiedRules.mjs +1 -1
  270. package/validation/validate.js +1 -1
  271. package/validation/validate.mjs +1 -1
  272. package/codecov.yml +0 -14
@@ -8,8 +8,9 @@
8
8
  */
9
9
 
10
10
  export default function invariant(condition: mixed, message: string) {
11
+ const booleanCondition = Boolean(condition);
11
12
  /* istanbul ignore else */
12
- if (!condition) {
13
+ if (!booleanCondition) {
13
14
  throw new Error(message);
14
15
  }
15
16
  }
@@ -7,8 +7,10 @@
7
7
  *
8
8
  */
9
9
  export default function invariant(condition, message) {
10
+ var booleanCondition = Boolean(condition);
10
11
  /* istanbul ignore else */
11
- if (!condition) {
12
+
13
+ if (!booleanCondition) {
12
14
  throw new Error(message);
13
15
  }
14
- }
16
+ }
@@ -19,4 +19,4 @@ exports.default = isInvalid;
19
19
  */
20
20
  function isInvalid(value) {
21
21
  return value === undefined || value !== value;
22
- }
22
+ }
@@ -12,4 +12,4 @@
12
12
  */
13
13
  export default function isInvalid(value) {
14
14
  return value === undefined || value !== value;
15
- }
15
+ }
@@ -19,4 +19,4 @@ exports.default = isNullish;
19
19
  */
20
20
  function isNullish(value) {
21
21
  return value === null || value === undefined || value !== value;
22
- }
22
+ }
@@ -12,4 +12,4 @@
12
12
  */
13
13
  export default function isNullish(value) {
14
14
  return value === null || value === undefined || value !== value;
15
- }
15
+ }
@@ -21,4 +21,4 @@ exports.default = isPromise;
21
21
  // eslint-disable-next-line no-redeclare
22
22
  function isPromise(value) {
23
23
  return Boolean(value && typeof value.then === 'function');
24
- }
24
+ }
@@ -14,4 +14,4 @@
14
14
  // eslint-disable-next-line no-redeclare
15
15
  export default function isPromise(value) {
16
16
  return Boolean(value && typeof value.then === 'function');
17
- }
17
+ }
package/jsutils/keyMap.js CHANGED
@@ -39,6 +39,7 @@ exports.default = keyMap;
39
39
  */
40
40
  function keyMap(list, keyFn) {
41
41
  return list.reduce(function (map, item) {
42
- return map[keyFn(item)] = item, map;
42
+ map[keyFn(item)] = item;
43
+ return map;
43
44
  }, Object.create(null));
44
- }
45
+ }
@@ -36,8 +36,8 @@ export default function keyMap<T>(
36
36
  list: $ReadOnlyArray<T>,
37
37
  keyFn: (item: T) => string,
38
38
  ): ObjMap<T> {
39
- return list.reduce(
40
- (map, item) => ((map[keyFn(item)] = item), map),
41
- Object.create(null),
42
- );
39
+ return list.reduce((map, item) => {
40
+ map[keyFn(item)] = item;
41
+ return map;
42
+ }, Object.create(null));
43
43
  }
@@ -32,6 +32,7 @@
32
32
  */
33
33
  export default function keyMap(list, keyFn) {
34
34
  return list.reduce(function (map, item) {
35
- return map[keyFn(item)] = item, map;
35
+ map[keyFn(item)] = item;
36
+ return map;
36
37
  }, Object.create(null));
37
- }
38
+ }
@@ -33,6 +33,7 @@ exports.default = keyValMap;
33
33
  */
34
34
  function keyValMap(list, keyFn, valFn) {
35
35
  return list.reduce(function (map, item) {
36
- return map[keyFn(item)] = valFn(item), map;
36
+ map[keyFn(item)] = valFn(item);
37
+ return map;
37
38
  }, Object.create(null));
38
- }
39
+ }
@@ -31,8 +31,8 @@ export default function keyValMap<T, V>(
31
31
  keyFn: (item: T) => string,
32
32
  valFn: (item: T) => V,
33
33
  ): ObjMap<V> {
34
- return list.reduce(
35
- (map, item) => ((map[keyFn(item)] = valFn(item)), map),
36
- Object.create(null),
37
- );
34
+ return list.reduce((map, item) => {
35
+ map[keyFn(item)] = valFn(item);
36
+ return map;
37
+ }, Object.create(null));
38
38
  }
@@ -26,6 +26,7 @@
26
26
  */
27
27
  export default function keyValMap(list, keyFn, valFn) {
28
28
  return list.reduce(function (map, item) {
29
- return map[keyFn(item)] = valFn(item), map;
29
+ map[keyFn(item)] = valFn(item);
30
+ return map;
30
31
  }, Object.create(null));
31
- }
32
+ }
@@ -51,4 +51,4 @@ function mapValue(map, fn) {
51
51
  }
52
52
 
53
53
  return result;
54
- }
54
+ }
@@ -41,4 +41,4 @@ export default function mapValue(map, fn) {
41
41
  }
42
42
 
43
43
  return result;
44
- }
44
+ }
@@ -48,10 +48,10 @@ function memoize3(fn) {
48
48
  cache1.set(a2, cache2);
49
49
  }
50
50
 
51
- var newValue = fn.apply(this, arguments);
51
+ var newValue = fn(a1, a2, a3);
52
52
  cache2.set(a3, newValue);
53
53
  return newValue;
54
54
  }
55
55
 
56
56
  return memoized;
57
- }
57
+ }
@@ -36,7 +36,7 @@ export default function memoize3<T: (a1: any, a2: any, a3: any) => any>(
36
36
  cache2 = new WeakMap();
37
37
  cache1.set(a2, cache2);
38
38
  }
39
- const newValue = fn.apply(this, arguments);
39
+ const newValue = fn(a1, a2, a3);
40
40
  cache2.set(a3, newValue);
41
41
  return newValue;
42
42
  }
@@ -41,10 +41,10 @@ export default function memoize3(fn) {
41
41
  cache1.set(a2, cache2);
42
42
  }
43
43
 
44
- var newValue = fn.apply(this, arguments);
44
+ var newValue = fn(a1, a2, a3);
45
45
  cache2.set(a3, newValue);
46
46
  return newValue;
47
47
  }
48
48
 
49
49
  return memoized;
50
- }
50
+ }
@@ -15,4 +15,4 @@ exports.default = void 0;
15
15
  */
16
16
  var nodejsCustomInspectSymbol = typeof Symbol === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;
17
17
  var _default = nodejsCustomInspectSymbol;
18
- exports.default = _default;
18
+ exports.default = _default;
@@ -7,4 +7,4 @@
7
7
  *
8
8
  */
9
9
  var nodejsCustomInspectSymbol = typeof Symbol === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;
10
- export default nodejsCustomInspectSymbol;
10
+ export default nodejsCustomInspectSymbol;
package/jsutils/orList.js CHANGED
@@ -36,4 +36,4 @@ function orList(items) {
36
36
  var selected = items.slice(0, MAX_LENGTH);
37
37
  var lastItem = selected.pop();
38
38
  return selected.join(', ') + ', or ' + lastItem;
39
- }
39
+ }
@@ -26,4 +26,4 @@ export default function orList(items) {
26
26
  var selected = items.slice(0, MAX_LENGTH);
27
27
  var lastItem = selected.pop();
28
28
  return selected.join(', ') + ', or ' + lastItem;
29
- }
29
+ }
@@ -32,4 +32,4 @@ function promiseForObject(object) {
32
32
  return resolvedObject;
33
33
  }, Object.create(null));
34
34
  });
35
- }
35
+ }
@@ -25,4 +25,4 @@ export default function promiseForObject(object) {
25
25
  return resolvedObject;
26
26
  }, Object.create(null));
27
27
  });
28
- }
28
+ }
@@ -31,4 +31,4 @@ function promiseReduce(values, callback, initialValue) {
31
31
  return callback(resolved, value);
32
32
  }) : callback(previous, value);
33
33
  }, initialValue);
34
- }
34
+ }
@@ -21,4 +21,4 @@ export default function promiseReduce(values, callback, initialValue) {
21
21
  return callback(resolved, value);
22
22
  }) : callback(previous, value);
23
23
  }, initialValue);
24
- }
24
+ }
@@ -25,4 +25,4 @@ function quotedOrList(items) {
25
25
  return (0, _orList.default)(items.map(function (item) {
26
26
  return "\"".concat(item, "\"");
27
27
  }));
28
- }
28
+ }
@@ -15,4 +15,4 @@ export default function quotedOrList(items) {
15
15
  return orList(items.map(function (item) {
16
16
  return "\"".concat(item, "\"");
17
17
  }));
18
- }
18
+ }
@@ -93,4 +93,4 @@ function lexicalDistance(aStr, bStr) {
93
93
  }
94
94
 
95
95
  return d[aLength][bLength];
96
- }
96
+ }
@@ -85,4 +85,4 @@ function lexicalDistance(aStr, bStr) {
85
85
  }
86
86
 
87
87
  return d[aLength][bLength];
88
- }
88
+ }
package/language/ast.js CHANGED
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";
package/language/ast.mjs CHANGED
@@ -0,0 +1 @@
1
+
@@ -111,4 +111,4 @@ function printBlockString(value) {
111
111
  }
112
112
 
113
113
  return '"""' + result.replace(/"""/g, '\\"""') + '"""';
114
- }
114
+ }
@@ -80,7 +80,7 @@ function isBlank(str) {
80
80
  export function printBlockString(
81
81
  value: string,
82
82
  indentation?: string = '',
83
- preferMultipleLines?: ?boolean = false,
83
+ preferMultipleLines?: boolean = false,
84
84
  ): string {
85
85
  const isSingleLine = value.indexOf('\n') === -1;
86
86
  const hasLeadingSpace = value[0] === ' ' || value[0] === '\t';
@@ -101,4 +101,4 @@ export function printBlockString(value) {
101
101
  }
102
102
 
103
103
  return '"""' + result.replace(/"""/g, '\\"""') + '"""';
104
- }
104
+ }
@@ -44,4 +44,4 @@ var DirectiveLocation = Object.freeze({
44
44
  * The enum type representing the directive location values.
45
45
  */
46
46
 
47
- exports.DirectiveLocation = DirectiveLocation;
47
+ exports.DirectiveLocation = DirectiveLocation;
@@ -35,4 +35,4 @@ export var DirectiveLocation = Object.freeze({
35
35
  });
36
36
  /**
37
37
  * The enum type representing the directive location values.
38
- */
38
+ */
package/language/index.js CHANGED
@@ -164,4 +164,4 @@ var _visitor = require("./visitor");
164
164
 
165
165
  var _predicates = require("./predicates");
166
166
 
167
- var _directiveLocation = require("./directiveLocation");
167
+ var _directiveLocation = require("./directiveLocation");
@@ -14,4 +14,4 @@ export { parse, parseValue, parseType } from './parser';
14
14
  export { print } from './printer';
15
15
  export { visit, visitInParallel, visitWithTypeInfo, getVisitFn, BREAK } from './visitor';
16
16
  export { isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from './predicates';
17
- export { DirectiveLocation } from './directiveLocation';
17
+ export { DirectiveLocation } from './directiveLocation';
package/language/kinds.js CHANGED
@@ -77,4 +77,4 @@ var Kind = Object.freeze({
77
77
  * The enum type representing the possible kind values of AST nodes.
78
78
  */
79
79
 
80
- exports.Kind = Kind;
80
+ exports.Kind = Kind;
@@ -68,4 +68,4 @@ export var Kind = Object.freeze({
68
68
  });
69
69
  /**
70
70
  * The enum type representing the possible kind values of AST nodes.
71
- */
71
+ */
package/language/lexer.js CHANGED
@@ -539,16 +539,18 @@ function readString(source, start, line, col, prev) {
539
539
  break;
540
540
 
541
541
  case 117:
542
- // u
543
- var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));
542
+ {
543
+ // uXXXX
544
+ var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));
544
545
 
545
- if (charCode < 0) {
546
- throw (0, _error.syntaxError)(source, position, 'Invalid character escape sequence: ' + "\\u".concat(body.slice(position + 1, position + 5), "."));
547
- }
546
+ if (charCode < 0) {
547
+ throw (0, _error.syntaxError)(source, position, 'Invalid character escape sequence: ' + "\\u".concat(body.slice(position + 1, position + 5), "."));
548
+ }
548
549
 
549
- value += String.fromCharCode(charCode);
550
- position += 4;
551
- break;
550
+ value += String.fromCharCode(charCode);
551
+ position += 4;
552
+ break;
553
+ }
552
554
 
553
555
  default:
554
556
  throw (0, _error.syntaxError)(source, position, "Invalid character escape sequence: \\".concat(String.fromCharCode(code), "."));
@@ -667,4 +669,4 @@ function readName(source, start, line, col, prev) {
667
669
  }
668
670
 
669
671
  return new Tok(TokenKind.NAME, start, position, line, col, prev, body.slice(start, position));
670
- }
672
+ }
@@ -597,7 +597,8 @@ function readString(source, start, line, col, prev): Token {
597
597
  case 116:
598
598
  value += '\t';
599
599
  break;
600
- case 117: // u
600
+ case 117: {
601
+ // uXXXX
601
602
  const charCode = uniCharCode(
602
603
  body.charCodeAt(position + 1),
603
604
  body.charCodeAt(position + 2),
@@ -615,6 +616,7 @@ function readString(source, start, line, col, prev): Token {
615
616
  value += String.fromCharCode(charCode);
616
617
  position += 4;
617
618
  break;
619
+ }
618
620
  default:
619
621
  throw syntaxError(
620
622
  source,
@@ -520,16 +520,18 @@ function readString(source, start, line, col, prev) {
520
520
  break;
521
521
 
522
522
  case 117:
523
- // u
524
- var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));
523
+ {
524
+ // uXXXX
525
+ var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));
525
526
 
526
- if (charCode < 0) {
527
- throw syntaxError(source, position, 'Invalid character escape sequence: ' + "\\u".concat(body.slice(position + 1, position + 5), "."));
528
- }
527
+ if (charCode < 0) {
528
+ throw syntaxError(source, position, 'Invalid character escape sequence: ' + "\\u".concat(body.slice(position + 1, position + 5), "."));
529
+ }
529
530
 
530
- value += String.fromCharCode(charCode);
531
- position += 4;
532
- break;
531
+ value += String.fromCharCode(charCode);
532
+ position += 4;
533
+ break;
534
+ }
533
535
 
534
536
  default:
535
537
  throw syntaxError(source, position, "Invalid character escape sequence: \\".concat(String.fromCharCode(code), "."));
@@ -648,4 +650,4 @@ function readName(source, start, line, col, prev) {
648
650
  }
649
651
 
650
652
  return new Tok(TokenKind.NAME, start, position, line, col, prev, body.slice(start, position));
651
- }
653
+ }
@@ -37,4 +37,4 @@ function getLocation(source, position) {
37
37
  line: line,
38
38
  column: column
39
39
  };
40
- }
40
+ }
@@ -30,4 +30,4 @@ export function getLocation(source, position) {
30
30
  line: line,
31
31
  column: column
32
32
  };
33
- }
33
+ }
@@ -1375,7 +1375,7 @@ function parseDirectiveLocation(lexer) {
1375
1375
  var start = lexer.token;
1376
1376
  var name = parseName(lexer);
1377
1377
 
1378
- if (_directiveLocation.DirectiveLocation.hasOwnProperty(name.value)) {
1378
+ if (_directiveLocation.DirectiveLocation[name.value] !== undefined) {
1379
1379
  return name;
1380
1380
  }
1381
1381
 
@@ -1525,4 +1525,4 @@ function many(lexer, openKind, parseFn, closeKind) {
1525
1525
  }
1526
1526
 
1527
1527
  return nodes;
1528
- }
1528
+ }
@@ -1424,7 +1424,7 @@ function parseDirectiveLocations(lexer: Lexer<*>): Array<NameNode> {
1424
1424
  function parseDirectiveLocation(lexer: Lexer<*>): NameNode {
1425
1425
  const start = lexer.token;
1426
1426
  const name = parseName(lexer);
1427
- if (DirectiveLocation.hasOwnProperty(name.value)) {
1427
+ if (DirectiveLocation[name.value] !== undefined) {
1428
1428
  return name;
1429
1429
  }
1430
1430
  throw unexpected(lexer, start);
@@ -1352,7 +1352,7 @@ function parseDirectiveLocation(lexer) {
1352
1352
  var start = lexer.token;
1353
1353
  var name = parseName(lexer);
1354
1354
 
1355
- if (DirectiveLocation.hasOwnProperty(name.value)) {
1355
+ if (DirectiveLocation[name.value] !== undefined) {
1356
1356
  return name;
1357
1357
  }
1358
1358
 
@@ -1502,4 +1502,4 @@ function many(lexer, openKind, parseFn, closeKind) {
1502
1502
  }
1503
1503
 
1504
1504
  return nodes;
1505
- }
1505
+ }
@@ -57,4 +57,4 @@ function isTypeSystemExtensionNode(node) {
57
57
 
58
58
  function isTypeExtensionNode(node) {
59
59
  return node.kind === _kinds.Kind.SCALAR_TYPE_EXTENSION || node.kind === _kinds.Kind.OBJECT_TYPE_EXTENSION || node.kind === _kinds.Kind.INTERFACE_TYPE_EXTENSION || node.kind === _kinds.Kind.UNION_TYPE_EXTENSION || node.kind === _kinds.Kind.ENUM_TYPE_EXTENSION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION;
60
- }
60
+ }
@@ -33,4 +33,4 @@ export function isTypeSystemExtensionNode(node) {
33
33
  }
34
34
  export function isTypeExtensionNode(node) {
35
35
  return node.kind === Kind.SCALAR_TYPE_EXTENSION || node.kind === Kind.OBJECT_TYPE_EXTENSION || node.kind === Kind.INTERFACE_TYPE_EXTENSION || node.kind === Kind.UNION_TYPE_EXTENSION || node.kind === Kind.ENUM_TYPE_EXTENSION || node.kind === Kind.INPUT_OBJECT_TYPE_EXTENSION;
36
- }
36
+ }
@@ -314,4 +314,4 @@ function isMultiline(string) {
314
314
 
315
315
  function hasMultilineItems(maybeArray) {
316
316
  return maybeArray && maybeArray.some(isMultiline);
317
- }
317
+ }
@@ -304,4 +304,4 @@ function isMultiline(string) {
304
304
 
305
305
  function hasMultilineItems(maybeArray) {
306
306
  return maybeArray && maybeArray.some(isMultiline);
307
- }
307
+ }
@@ -41,4 +41,4 @@ var Source = function Source(body, name, locationOffset) {
41
41
 
42
42
 
43
43
  exports.Source = Source;
44
- (0, _defineToStringTag.default)(Source);
44
+ (0, _defineToStringTag.default)(Source);
@@ -28,4 +28,4 @@ export var Source = function Source(body, name, locationOffset) {
28
28
  !(this.locationOffset.column > 0) ? invariant(0, 'column in locationOffset is 1-indexed and must be positive') : void 0;
29
29
  }; // Conditionally apply `[Symbol.toStringTag]` if `Symbol`s are supported
30
30
 
31
- defineToStringTag(Source);
31
+ defineToStringTag(Source);
@@ -446,4 +446,4 @@ function getVisitFn(visitor, kind, isLeaving) {
446
446
  }
447
447
  }
448
448
  }
449
- }
449
+ }
@@ -427,4 +427,4 @@ export function getVisitFn(visitor, kind, isLeaving) {
427
427
  }
428
428
  }
429
429
  }
430
- }
430
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql",
3
- "version": "14.3.0",
3
+ "version": "14.3.1",
4
4
  "description": "A Query Language and Runtime which can target any service.",
5
5
  "license": "MIT",
6
6
  "main": "index",
package/polyfills/find.js CHANGED
@@ -28,4 +28,4 @@ var find = Array.prototype.find ? function (list, predicate) {
28
28
  }
29
29
  };
30
30
  var _default = find;
31
- exports.default = _default;
31
+ exports.default = _default;
@@ -20,4 +20,4 @@ var find = Array.prototype.find ? function (list, predicate) {
20
20
  }
21
21
  }
22
22
  };
23
- export default find;
23
+ export default find;
@@ -35,4 +35,4 @@ var flatMap = Array.prototype.flatMap ? function (list, fn) {
35
35
  return result;
36
36
  };
37
37
  var _default = flatMap;
38
- exports.default = _default;
38
+ exports.default = _default;
@@ -27,4 +27,4 @@ var flatMap = Array.prototype.flatMap ? function (list, fn) {
27
27
 
28
28
  return result;
29
29
  };
30
- export default flatMap;
30
+ export default flatMap;
@@ -21,4 +21,4 @@ var isFinite = Number.isFinite || function (value) {
21
21
  };
22
22
 
23
23
  var _default = isFinite;
24
- exports.default = _default;
24
+ exports.default = _default;
@@ -13,4 +13,4 @@ var isFinite = Number.isFinite || function (value) {
13
13
  return typeof value === 'number' && isFinite(value);
14
14
  };
15
15
 
16
- export default isFinite;
16
+ export default isFinite;
@@ -21,4 +21,4 @@ var isInteger = Number.isInteger || function (value) {
21
21
  };
22
22
 
23
23
  var _default = isInteger;
24
- exports.default = _default;
24
+ exports.default = _default;
@@ -13,4 +13,4 @@ var isInteger = Number.isInteger || function (value) {
13
13
  return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
14
14
  };
15
15
 
16
- export default isInteger;
16
+ export default isInteger;
@@ -23,4 +23,4 @@ var objectEntries = Object.entries || function (obj) {
23
23
  };
24
24
 
25
25
  var _default = objectEntries;
26
- exports.default = _default;
26
+ exports.default = _default;