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
@@ -302,6 +302,7 @@ function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames
302
302
  // A field map is a keyed collection, where each key represents a response
303
303
  // name and the value at that key is a list of all fields which provide that
304
304
  // response name. For every response name, if there are multiple fields, they
305
+ // must be compared to find a potential conflict.
305
306
  var _iteratorNormalCompletion = true;
306
307
  var _didIteratorError = false;
307
308
  var _iteratorError = undefined;
@@ -516,33 +517,37 @@ function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeA
516
517
 
517
518
  switch (selection.kind) {
518
519
  case _kinds.Kind.FIELD:
519
- var fieldName = selection.name.value;
520
- var fieldDef = void 0;
520
+ {
521
+ var fieldName = selection.name.value;
522
+ var fieldDef = void 0;
521
523
 
522
- if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) {
523
- fieldDef = parentType.getFields()[fieldName];
524
- }
524
+ if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) {
525
+ fieldDef = parentType.getFields()[fieldName];
526
+ }
525
527
 
526
- var responseName = selection.alias ? selection.alias.value : fieldName;
528
+ var responseName = selection.alias ? selection.alias.value : fieldName;
527
529
 
528
- if (!nodeAndDefs[responseName]) {
529
- nodeAndDefs[responseName] = [];
530
- }
530
+ if (!nodeAndDefs[responseName]) {
531
+ nodeAndDefs[responseName] = [];
532
+ }
531
533
 
532
- nodeAndDefs[responseName].push([parentType, selection, fieldDef]);
533
- break;
534
+ nodeAndDefs[responseName].push([parentType, selection, fieldDef]);
535
+ break;
536
+ }
534
537
 
535
538
  case _kinds.Kind.FRAGMENT_SPREAD:
536
539
  fragmentNames[selection.name.value] = true;
537
540
  break;
538
541
 
539
542
  case _kinds.Kind.INLINE_FRAGMENT:
540
- var typeCondition = selection.typeCondition;
541
- var inlineFragmentType = typeCondition ? (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition) : parentType;
543
+ {
544
+ var typeCondition = selection.typeCondition;
545
+ var inlineFragmentType = typeCondition ? (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition) : parentType;
542
546
 
543
- _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames);
547
+ _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames);
544
548
 
545
- break;
549
+ break;
550
+ }
546
551
  }
547
552
  }
548
553
  } // Given a series of Conflicts which occurred between two sub-fields, generate
@@ -614,4 +619,4 @@ function _pairSetAdd(data, a, b, areMutuallyExclusive) {
614
619
  }
615
620
 
616
621
  map[b] = areMutuallyExclusive;
617
- }
622
+ }
@@ -747,7 +747,7 @@ function _collectFieldsAndFragmentNames(
747
747
  for (let i = 0; i < selectionSet.selections.length; i++) {
748
748
  const selection = selectionSet.selections[i];
749
749
  switch (selection.kind) {
750
- case Kind.FIELD:
750
+ case Kind.FIELD: {
751
751
  const fieldName = selection.name.value;
752
752
  let fieldDef;
753
753
  if (isObjectType(parentType) || isInterfaceType(parentType)) {
@@ -761,10 +761,11 @@ function _collectFieldsAndFragmentNames(
761
761
  }
762
762
  nodeAndDefs[responseName].push([parentType, selection, fieldDef]);
763
763
  break;
764
+ }
764
765
  case Kind.FRAGMENT_SPREAD:
765
766
  fragmentNames[selection.name.value] = true;
766
767
  break;
767
- case Kind.INLINE_FRAGMENT:
768
+ case Kind.INLINE_FRAGMENT: {
768
769
  const typeCondition = selection.typeCondition;
769
770
  const inlineFragmentType = typeCondition
770
771
  ? typeFromAST(context.getSchema(), typeCondition)
@@ -777,6 +778,7 @@ function _collectFieldsAndFragmentNames(
777
778
  fragmentNames,
778
779
  );
779
780
  break;
781
+ }
780
782
  }
781
783
  }
782
784
  }
@@ -284,6 +284,7 @@ function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames
284
284
  // A field map is a keyed collection, where each key represents a response
285
285
  // name and the value at that key is a list of all fields which provide that
286
286
  // response name. For every response name, if there are multiple fields, they
287
+ // must be compared to find a potential conflict.
287
288
  var _iteratorNormalCompletion = true;
288
289
  var _didIteratorError = false;
289
290
  var _iteratorError = undefined;
@@ -498,33 +499,37 @@ function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeA
498
499
 
499
500
  switch (selection.kind) {
500
501
  case Kind.FIELD:
501
- var fieldName = selection.name.value;
502
- var fieldDef = void 0;
502
+ {
503
+ var fieldName = selection.name.value;
504
+ var fieldDef = void 0;
503
505
 
504
- if (isObjectType(parentType) || isInterfaceType(parentType)) {
505
- fieldDef = parentType.getFields()[fieldName];
506
- }
506
+ if (isObjectType(parentType) || isInterfaceType(parentType)) {
507
+ fieldDef = parentType.getFields()[fieldName];
508
+ }
507
509
 
508
- var responseName = selection.alias ? selection.alias.value : fieldName;
510
+ var responseName = selection.alias ? selection.alias.value : fieldName;
509
511
 
510
- if (!nodeAndDefs[responseName]) {
511
- nodeAndDefs[responseName] = [];
512
- }
512
+ if (!nodeAndDefs[responseName]) {
513
+ nodeAndDefs[responseName] = [];
514
+ }
513
515
 
514
- nodeAndDefs[responseName].push([parentType, selection, fieldDef]);
515
- break;
516
+ nodeAndDefs[responseName].push([parentType, selection, fieldDef]);
517
+ break;
518
+ }
516
519
 
517
520
  case Kind.FRAGMENT_SPREAD:
518
521
  fragmentNames[selection.name.value] = true;
519
522
  break;
520
523
 
521
524
  case Kind.INLINE_FRAGMENT:
522
- var typeCondition = selection.typeCondition;
523
- var inlineFragmentType = typeCondition ? typeFromAST(context.getSchema(), typeCondition) : parentType;
525
+ {
526
+ var typeCondition = selection.typeCondition;
527
+ var inlineFragmentType = typeCondition ? typeFromAST(context.getSchema(), typeCondition) : parentType;
524
528
 
525
- _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames);
529
+ _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames);
526
530
 
527
- break;
531
+ break;
532
+ }
528
533
  }
529
534
  }
530
535
  } // Given a series of Conflicts which occurred between two sub-fields, generate
@@ -596,4 +601,4 @@ function _pairSetAdd(data, a, b, areMutuallyExclusive) {
596
601
  }
597
602
 
598
603
  map[b] = areMutuallyExclusive;
599
- }
604
+ }
@@ -75,4 +75,4 @@ function getFragmentType(context, name) {
75
75
  return type;
76
76
  }
77
77
  }
78
- }
78
+ }
@@ -57,4 +57,4 @@ function getFragmentType(context, name) {
57
57
  return type;
58
58
  }
59
59
  }
60
- }
60
+ }
@@ -155,4 +155,4 @@ function extensionKindToTypeName(kind) {
155
155
  default:
156
156
  return 'unknown type';
157
157
  }
158
- }
158
+ }
@@ -143,4 +143,4 @@ function extensionKindToTypeName(kind) {
143
143
  default:
144
144
  return 'unknown type';
145
145
  }
146
- }
146
+ }
@@ -180,4 +180,4 @@ function ProvidedRequiredArgumentsOnDirectives(context) {
180
180
 
181
181
  function isRequiredArgumentNode(arg) {
182
182
  return arg.type.kind === _kinds.Kind.NON_NULL_TYPE && arg.defaultValue == null;
183
- }
183
+ }
@@ -166,4 +166,4 @@ export function ProvidedRequiredArgumentsOnDirectives(context) {
166
166
 
167
167
  function isRequiredArgumentNode(arg) {
168
168
  return arg.type.kind === Kind.NON_NULL_TYPE && arg.defaultValue == null;
169
- }
169
+ }
@@ -55,4 +55,4 @@ function ScalarLeafs(context) {
55
55
  }
56
56
  }
57
57
  };
58
- }
58
+ }
@@ -39,4 +39,4 @@ export function ScalarLeafs(context) {
39
39
  }
40
40
  }
41
41
  };
42
- }
42
+ }
@@ -36,4 +36,4 @@ function SingleFieldSubscriptions(context) {
36
36
  }
37
37
  }
38
38
  };
39
- }
39
+ }
@@ -26,4 +26,4 @@ export function SingleFieldSubscriptions(context) {
26
26
  }
27
27
  }
28
28
  };
29
- }
29
+ }
@@ -48,4 +48,4 @@ function UniqueArgumentNames(context) {
48
48
  return false;
49
49
  }
50
50
  };
51
- }
51
+ }
@@ -38,4 +38,4 @@ export function UniqueArgumentNames(context) {
38
38
  return false;
39
39
  }
40
40
  };
41
- }
41
+ }
@@ -52,4 +52,4 @@ function UniqueDirectiveNames(context) {
52
52
  return false;
53
53
  }
54
54
  };
55
- }
55
+ }
@@ -40,4 +40,4 @@ export function UniqueDirectiveNames(context) {
40
40
  return false;
41
41
  }
42
42
  };
43
- }
43
+ }
@@ -34,6 +34,7 @@ function UniqueDirectivesPerLocation(context) {
34
34
  // defines any directives.
35
35
  enter: function enter(node) {
36
36
  // Flow can't refine that node.directives will only contain directives,
37
+ // so we cast so the rest of the code is well typed.
37
38
  var directives = node.directives;
38
39
 
39
40
  if (directives) {
@@ -70,4 +71,4 @@ function UniqueDirectivesPerLocation(context) {
70
71
  }
71
72
  }
72
73
  };
73
- }
74
+ }
@@ -24,6 +24,7 @@ export function UniqueDirectivesPerLocation(context) {
24
24
  // defines any directives.
25
25
  enter: function enter(node) {
26
26
  // Flow can't refine that node.directives will only contain directives,
27
+ // so we cast so the rest of the code is well typed.
27
28
  var directives = node.directives;
28
29
 
29
30
  if (directives) {
@@ -60,4 +61,4 @@ export function UniqueDirectivesPerLocation(context) {
60
61
  }
61
62
  }
62
63
  };
63
- }
64
+ }
@@ -87,4 +87,4 @@ function UniqueEnumValueNames(context) {
87
87
 
88
88
  return false;
89
89
  }
90
- }
90
+ }
@@ -74,4 +74,4 @@ export function UniqueEnumValueNames(context) {
74
74
 
75
75
  return false;
76
76
  }
77
- }
77
+ }
@@ -98,4 +98,4 @@ function hasField(type, fieldName) {
98
98
  }
99
99
 
100
100
  return false;
101
- }
101
+ }
@@ -85,4 +85,4 @@ function hasField(type, fieldName) {
85
85
  }
86
86
 
87
87
  return false;
88
- }
88
+ }
@@ -44,4 +44,4 @@ function UniqueFragmentNames(context) {
44
44
  return false;
45
45
  }
46
46
  };
47
- }
47
+ }
@@ -34,4 +34,4 @@ export function UniqueFragmentNames(context) {
34
34
  return false;
35
35
  }
36
36
  };
37
- }
37
+ }
@@ -50,4 +50,4 @@ function UniqueInputFieldNames(context) {
50
50
  }
51
51
  }
52
52
  };
53
- }
53
+ }
@@ -40,4 +40,4 @@ export function UniqueInputFieldNames(context) {
40
40
  }
41
41
  }
42
42
  };
43
- }
43
+ }
@@ -46,4 +46,4 @@ function UniqueOperationNames(context) {
46
46
  return false;
47
47
  }
48
48
  };
49
- }
49
+ }
@@ -36,4 +36,4 @@ export function UniqueOperationNames(context) {
36
36
  return false;
37
37
  }
38
38
  };
39
- }
39
+ }
@@ -82,4 +82,4 @@ function UniqueOperationTypes(context) {
82
82
 
83
83
  return false;
84
84
  }
85
- }
85
+ }
@@ -70,4 +70,4 @@ export function UniqueOperationTypes(context) {
70
70
 
71
71
  return false;
72
72
  }
73
- }
73
+ }
@@ -59,4 +59,4 @@ function UniqueTypeNames(context) {
59
59
 
60
60
  return false;
61
61
  }
62
- }
62
+ }
@@ -47,4 +47,4 @@ export function UniqueTypeNames(context) {
47
47
 
48
48
  return false;
49
49
  }
50
- }
50
+ }
@@ -42,4 +42,4 @@ function UniqueVariableNames(context) {
42
42
  }
43
43
  }
44
44
  };
45
- }
45
+ }
@@ -32,4 +32,4 @@ export function UniqueVariableNames(context) {
32
32
  }
33
33
  }
34
34
  };
35
- }
35
+ }
@@ -195,4 +195,4 @@ function enumTypeSuggestion(type, node) {
195
195
  return "Did you mean the enum value ".concat((0, _orList.default)(suggestions), "?");
196
196
  }
197
197
  }
198
- }
198
+ }
@@ -170,4 +170,4 @@ function enumTypeSuggestion(type, node) {
170
170
  return "Did you mean the enum value ".concat(orList(suggestions), "?");
171
171
  }
172
172
  }
173
- }
173
+ }
@@ -44,4 +44,4 @@ function VariablesAreInputTypes(context) {
44
44
  }
45
45
  }
46
46
  };
47
- }
47
+ }
@@ -31,4 +31,4 @@ export function VariablesAreInputTypes(context) {
31
31
  }
32
32
  }
33
33
  };
34
- }
34
+ }
@@ -102,7 +102,7 @@ function VariablesInAllowedPosition(context) {
102
102
 
103
103
  function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) {
104
104
  if ((0, _definition.isNonNullType)(locationType) && !(0, _definition.isNonNullType)(varType)) {
105
- var hasNonNullVariableDefaultValue = varDefaultValue && varDefaultValue.kind !== _kinds.Kind.NULL;
105
+ var hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== _kinds.Kind.NULL;
106
106
  var hasLocationDefaultValue = locationDefaultValue !== undefined;
107
107
 
108
108
  if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {
@@ -114,4 +114,4 @@ function allowedVariableUsage(schema, varType, varDefaultValue, locationType, lo
114
114
  }
115
115
 
116
116
  return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, locationType);
117
- }
117
+ }
@@ -97,7 +97,7 @@ function allowedVariableUsage(
97
97
  ): boolean {
98
98
  if (isNonNullType(locationType) && !isNonNullType(varType)) {
99
99
  const hasNonNullVariableDefaultValue =
100
- varDefaultValue && varDefaultValue.kind !== Kind.NULL;
100
+ varDefaultValue != null && varDefaultValue.kind !== Kind.NULL;
101
101
  const hasLocationDefaultValue = locationDefaultValue !== undefined;
102
102
  if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {
103
103
  return false;
@@ -84,7 +84,7 @@ export function VariablesInAllowedPosition(context) {
84
84
 
85
85
  function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) {
86
86
  if (isNonNullType(locationType) && !isNonNullType(varType)) {
87
- var hasNonNullVariableDefaultValue = varDefaultValue && varDefaultValue.kind !== Kind.NULL;
87
+ var hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== Kind.NULL;
88
88
  var hasLocationDefaultValue = locationDefaultValue !== undefined;
89
89
 
90
90
  if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {
@@ -96,4 +96,4 @@ function allowedVariableUsage(schema, varType, varDefaultValue, locationType, lo
96
96
  }
97
97
 
98
98
  return isTypeSubTypeOf(schema, varType, locationType);
99
- }
99
+ }
@@ -116,4 +116,4 @@ var specifiedRules = [_ExecutableDefinitions.ExecutableDefinitions, _UniqueOpera
116
116
  exports.specifiedRules = specifiedRules;
117
117
  // @internal
118
118
  var specifiedSDLRules = [_LoneSchemaDefinition.LoneSchemaDefinition, _UniqueOperationTypes.UniqueOperationTypes, _UniqueTypeNames.UniqueTypeNames, _UniqueEnumValueNames.UniqueEnumValueNames, _UniqueFieldDefinitionNames.UniqueFieldDefinitionNames, _UniqueDirectiveNames.UniqueDirectiveNames, _KnownTypeNames.KnownTypeNames, _KnownDirectives.KnownDirectives, _UniqueDirectivesPerLocation.UniqueDirectivesPerLocation, _PossibleTypeExtensions.PossibleTypeExtensions, _KnownArgumentNames.KnownArgumentNamesOnDirectives, _UniqueArgumentNames.UniqueArgumentNames, _UniqueInputFieldNames.UniqueInputFieldNames, _ProvidedRequiredArguments.ProvidedRequiredArgumentsOnDirectives];
119
- exports.specifiedSDLRules = specifiedSDLRules;
119
+ exports.specifiedSDLRules = specifiedSDLRules;
@@ -76,4 +76,4 @@ import { UniqueFieldDefinitionNames } from './rules/UniqueFieldDefinitionNames';
76
76
  import { UniqueDirectiveNames } from './rules/UniqueDirectiveNames';
77
77
  import { PossibleTypeExtensions } from './rules/PossibleTypeExtensions'; // @internal
78
78
 
79
- export var specifiedSDLRules = [LoneSchemaDefinition, UniqueOperationTypes, UniqueTypeNames, UniqueEnumValueNames, UniqueFieldDefinitionNames, UniqueDirectiveNames, KnownTypeNames, KnownDirectives, UniqueDirectivesPerLocation, PossibleTypeExtensions, KnownArgumentNamesOnDirectives, UniqueArgumentNames, UniqueInputFieldNames, ProvidedRequiredArgumentsOnDirectives];
79
+ export var specifiedSDLRules = [LoneSchemaDefinition, UniqueOperationTypes, UniqueTypeNames, UniqueEnumValueNames, UniqueFieldDefinitionNames, UniqueDirectiveNames, KnownTypeNames, KnownDirectives, UniqueDirectivesPerLocation, PossibleTypeExtensions, KnownArgumentNamesOnDirectives, UniqueArgumentNames, UniqueInputFieldNames, ProvidedRequiredArgumentsOnDirectives];
@@ -107,4 +107,4 @@ function assertValidSDLExtension(documentAST, schema) {
107
107
  return error.message;
108
108
  }).join('\n\n'));
109
109
  }
110
- }
110
+ }
@@ -86,4 +86,4 @@ export function assertValidSDLExtension(documentAST, schema) {
86
86
  return error.message;
87
87
  }).join('\n\n'));
88
88
  }
89
- }
89
+ }
package/codecov.yml DELETED
@@ -1,14 +0,0 @@
1
- codecov:
2
- notify:
3
- require_ci_to_pass: yes
4
-
5
- parsers:
6
- javascript:
7
- enable_partials: yes
8
-
9
- comment: no
10
- coverage:
11
- status:
12
- project:
13
- default:
14
- target: auto