graphql 16.0.1 → 16.1.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.
Files changed (112) hide show
  1. package/README.md +4 -4
  2. package/error/GraphQLError.js +4 -1
  3. package/error/GraphQLError.mjs +4 -1
  4. package/error/locatedError.js +2 -8
  5. package/error/locatedError.mjs +2 -6
  6. package/execution/execute.js +16 -5
  7. package/execution/execute.mjs +16 -5
  8. package/execution/mapAsyncIterator.js +3 -1
  9. package/execution/mapAsyncIterator.mjs +3 -1
  10. package/execution/subscribe.js +8 -0
  11. package/execution/subscribe.mjs +7 -0
  12. package/execution/values.js +3 -2
  13. package/execution/values.mjs +3 -2
  14. package/graphql.js +8 -0
  15. package/graphql.mjs +7 -0
  16. package/index.d.ts +3 -0
  17. package/index.js +12 -0
  18. package/index.mjs +3 -0
  19. package/jsutils/devAssert.js +1 -1
  20. package/jsutils/devAssert.mjs +1 -1
  21. package/jsutils/instanceOf.js +3 -1
  22. package/jsutils/instanceOf.mjs +3 -1
  23. package/jsutils/invariant.js +1 -1
  24. package/jsutils/invariant.mjs +1 -1
  25. package/jsutils/mapValue.js +2 -2
  26. package/jsutils/mapValue.mjs +2 -2
  27. package/jsutils/toError.d.ts +4 -0
  28. package/jsutils/toError.js +25 -0
  29. package/jsutils/toError.mjs +18 -0
  30. package/language/blockString.d.ts +7 -3
  31. package/language/blockString.js +121 -64
  32. package/language/blockString.mjs +111 -62
  33. package/language/characterClasses.d.ts +9 -0
  34. package/language/characterClasses.js +13 -0
  35. package/language/characterClasses.mjs +12 -0
  36. package/language/lexer.js +21 -13
  37. package/language/lexer.mjs +22 -14
  38. package/language/parser.js +3 -2
  39. package/language/parser.mjs +3 -2
  40. package/language/printer.js +3 -1
  41. package/language/printer.mjs +3 -1
  42. package/language/visitor.js +2 -1
  43. package/language/visitor.mjs +2 -1
  44. package/package.json +4 -1
  45. package/type/directives.d.ts +1 -1
  46. package/type/directives.js +3 -3
  47. package/type/directives.mjs +3 -3
  48. package/type/index.d.ts +3 -0
  49. package/type/index.js +12 -0
  50. package/type/index.mjs +3 -0
  51. package/type/introspection.js +8 -4
  52. package/type/introspection.mjs +8 -4
  53. package/type/scalars.d.ts +10 -0
  54. package/type/scalars.js +18 -10
  55. package/type/scalars.mjs +16 -11
  56. package/type/schema.d.ts +1 -1
  57. package/type/schema.js +5 -3
  58. package/type/schema.mjs +4 -3
  59. package/type/validate.js +35 -26
  60. package/type/validate.mjs +35 -26
  61. package/utilities/TypeInfo.js +4 -0
  62. package/utilities/TypeInfo.mjs +4 -0
  63. package/utilities/assertValidName.js +3 -2
  64. package/utilities/assertValidName.mjs +3 -2
  65. package/utilities/astFromValue.js +4 -2
  66. package/utilities/astFromValue.mjs +4 -2
  67. package/utilities/buildClientSchema.js +2 -0
  68. package/utilities/buildClientSchema.mjs +2 -0
  69. package/utilities/coerceInputValue.js +4 -2
  70. package/utilities/coerceInputValue.mjs +4 -2
  71. package/utilities/extendSchema.js +40 -32
  72. package/utilities/extendSchema.mjs +40 -29
  73. package/utilities/findBreakingChanges.js +4 -2
  74. package/utilities/findBreakingChanges.mjs +4 -2
  75. package/utilities/lexicographicSortSchema.js +6 -5
  76. package/utilities/lexicographicSortSchema.mjs +6 -5
  77. package/utilities/printSchema.js +9 -7
  78. package/utilities/printSchema.mjs +10 -5
  79. package/utilities/separateOperations.js +2 -0
  80. package/utilities/separateOperations.mjs +2 -0
  81. package/utilities/stripIgnoredCharacters.js +3 -19
  82. package/utilities/stripIgnoredCharacters.mjs +4 -23
  83. package/utilities/typeFromAST.js +13 -24
  84. package/utilities/typeFromAST.mjs +12 -17
  85. package/utilities/valueFromAST.js +4 -2
  86. package/utilities/valueFromAST.mjs +4 -2
  87. package/utilities/valueFromASTUntyped.js +1 -11
  88. package/utilities/valueFromASTUntyped.mjs +1 -5
  89. package/validation/rules/KnownArgumentNamesRule.js +3 -1
  90. package/validation/rules/KnownArgumentNamesRule.mjs +3 -1
  91. package/validation/rules/KnownDirectivesRule.js +11 -7
  92. package/validation/rules/KnownDirectivesRule.mjs +7 -3
  93. package/validation/rules/OverlappingFieldsCanBeMergedRule.js +4 -3
  94. package/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +4 -3
  95. package/validation/rules/PossibleTypeExtensionsRule.js +14 -8
  96. package/validation/rules/PossibleTypeExtensionsRule.mjs +10 -4
  97. package/validation/rules/ProvidedRequiredArgumentsRule.js +8 -3
  98. package/validation/rules/ProvidedRequiredArgumentsRule.mjs +8 -3
  99. package/validation/rules/UniqueArgumentDefinitionNamesRule.js +9 -3
  100. package/validation/rules/UniqueArgumentDefinitionNamesRule.mjs +9 -3
  101. package/validation/rules/UniqueArgumentNamesRule.js +3 -1
  102. package/validation/rules/UniqueArgumentNamesRule.mjs +3 -1
  103. package/validation/rules/UniqueEnumValueNamesRule.js +3 -1
  104. package/validation/rules/UniqueEnumValueNamesRule.mjs +3 -1
  105. package/validation/rules/UniqueFieldDefinitionNamesRule.js +3 -1
  106. package/validation/rules/UniqueFieldDefinitionNamesRule.mjs +3 -1
  107. package/validation/rules/UniqueOperationTypesRule.js +3 -1
  108. package/validation/rules/UniqueOperationTypesRule.mjs +3 -1
  109. package/validation/rules/UniqueVariableNamesRule.js +3 -1
  110. package/validation/rules/UniqueVariableNamesRule.mjs +3 -1
  111. package/version.js +3 -3
  112. package/version.mjs +3 -3
@@ -20,7 +20,9 @@ function UniqueArgumentDefinitionNamesRule(context) {
20
20
  DirectiveDefinition(directiveNode) {
21
21
  var _directiveNode$argume;
22
22
 
23
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
23
+ // FIXME: https://github.com/graphql/graphql-js/issues/2203
24
+
25
+ /* c8 ignore next */
24
26
  const argumentNodes =
25
27
  (_directiveNode$argume = directiveNode.arguments) !== null &&
26
28
  _directiveNode$argume !== void 0
@@ -38,7 +40,9 @@ function UniqueArgumentDefinitionNamesRule(context) {
38
40
  function checkArgUniquenessPerField(typeNode) {
39
41
  var _typeNode$fields;
40
42
 
41
- const typeName = typeNode.name.value; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
43
+ const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203
44
+
45
+ /* c8 ignore next */
42
46
 
43
47
  const fieldNodes =
44
48
  (_typeNode$fields = typeNode.fields) !== null &&
@@ -49,7 +53,9 @@ function UniqueArgumentDefinitionNamesRule(context) {
49
53
  for (const fieldDef of fieldNodes) {
50
54
  var _fieldDef$arguments;
51
55
 
52
- const fieldName = fieldDef.name.value; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
56
+ const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203
57
+
58
+ /* c8 ignore next */
53
59
 
54
60
  const argumentNodes =
55
61
  (_fieldDef$arguments = fieldDef.arguments) !== null &&
@@ -12,7 +12,9 @@ export function UniqueArgumentDefinitionNamesRule(context) {
12
12
  DirectiveDefinition(directiveNode) {
13
13
  var _directiveNode$argume;
14
14
 
15
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
15
+ // FIXME: https://github.com/graphql/graphql-js/issues/2203
16
+
17
+ /* c8 ignore next */
16
18
  const argumentNodes =
17
19
  (_directiveNode$argume = directiveNode.arguments) !== null &&
18
20
  _directiveNode$argume !== void 0
@@ -30,7 +32,9 @@ export function UniqueArgumentDefinitionNamesRule(context) {
30
32
  function checkArgUniquenessPerField(typeNode) {
31
33
  var _typeNode$fields;
32
34
 
33
- const typeName = typeNode.name.value; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
35
+ const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203
36
+
37
+ /* c8 ignore next */
34
38
 
35
39
  const fieldNodes =
36
40
  (_typeNode$fields = typeNode.fields) !== null &&
@@ -41,7 +45,9 @@ export function UniqueArgumentDefinitionNamesRule(context) {
41
45
  for (const fieldDef of fieldNodes) {
42
46
  var _fieldDef$arguments;
43
47
 
44
- const fieldName = fieldDef.name.value; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
48
+ const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203
49
+
50
+ /* c8 ignore next */
45
51
 
46
52
  const argumentNodes =
47
53
  (_fieldDef$arguments = fieldDef.arguments) !== null &&
@@ -26,7 +26,9 @@ function UniqueArgumentNamesRule(context) {
26
26
  function checkArgUniqueness(parentNode) {
27
27
  var _parentNode$arguments;
28
28
 
29
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
29
+ // FIXME: https://github.com/graphql/graphql-js/issues/2203
30
+
31
+ /* c8 ignore next */
30
32
  const argumentNodes =
31
33
  (_parentNode$arguments = parentNode.arguments) !== null &&
32
34
  _parentNode$arguments !== void 0
@@ -18,7 +18,9 @@ export function UniqueArgumentNamesRule(context) {
18
18
  function checkArgUniqueness(parentNode) {
19
19
  var _parentNode$arguments;
20
20
 
21
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
21
+ // FIXME: https://github.com/graphql/graphql-js/issues/2203
22
+
23
+ /* c8 ignore next */
22
24
  const argumentNodes =
23
25
  (_parentNode$arguments = parentNode.arguments) !== null &&
24
26
  _parentNode$arguments !== void 0
@@ -30,7 +30,9 @@ function UniqueEnumValueNamesRule(context) {
30
30
 
31
31
  if (!knownValueNames[typeName]) {
32
32
  knownValueNames[typeName] = Object.create(null);
33
- } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
33
+ } // FIXME: https://github.com/graphql/graphql-js/issues/2203
34
+
35
+ /* c8 ignore next */
34
36
 
35
37
  const valueNodes =
36
38
  (_node$values = node.values) !== null && _node$values !== void 0
@@ -22,7 +22,9 @@ export function UniqueEnumValueNamesRule(context) {
22
22
 
23
23
  if (!knownValueNames[typeName]) {
24
24
  knownValueNames[typeName] = Object.create(null);
25
- } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
25
+ } // FIXME: https://github.com/graphql/graphql-js/issues/2203
26
+
27
+ /* c8 ignore next */
26
28
 
27
29
  const valueNodes =
28
30
  (_node$values = node.values) !== null && _node$values !== void 0
@@ -34,7 +34,9 @@ function UniqueFieldDefinitionNamesRule(context) {
34
34
 
35
35
  if (!knownFieldNames[typeName]) {
36
36
  knownFieldNames[typeName] = Object.create(null);
37
- } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
37
+ } // FIXME: https://github.com/graphql/graphql-js/issues/2203
38
+
39
+ /* c8 ignore next */
38
40
 
39
41
  const fieldNodes =
40
42
  (_node$fields = node.fields) !== null && _node$fields !== void 0
@@ -30,7 +30,9 @@ export function UniqueFieldDefinitionNamesRule(context) {
30
30
 
31
31
  if (!knownFieldNames[typeName]) {
32
32
  knownFieldNames[typeName] = Object.create(null);
33
- } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
33
+ } // FIXME: https://github.com/graphql/graphql-js/issues/2203
34
+
35
+ /* c8 ignore next */
34
36
 
35
37
  const fieldNodes =
36
38
  (_node$fields = node.fields) !== null && _node$fields !== void 0
@@ -30,7 +30,9 @@ function UniqueOperationTypesRule(context) {
30
30
  function checkOperationTypes(node) {
31
31
  var _node$operationTypes;
32
32
 
33
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
33
+ // See: https://github.com/graphql/graphql-js/issues/2203
34
+
35
+ /* c8 ignore next */
34
36
  const operationTypesNodes =
35
37
  (_node$operationTypes = node.operationTypes) !== null &&
36
38
  _node$operationTypes !== void 0
@@ -23,7 +23,9 @@ export function UniqueOperationTypesRule(context) {
23
23
  function checkOperationTypes(node) {
24
24
  var _node$operationTypes;
25
25
 
26
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
26
+ // See: https://github.com/graphql/graphql-js/issues/2203
27
+
28
+ /* c8 ignore next */
27
29
  const operationTypesNodes =
28
30
  (_node$operationTypes = node.operationTypes) !== null &&
29
31
  _node$operationTypes !== void 0
@@ -19,7 +19,9 @@ function UniqueVariableNamesRule(context) {
19
19
  OperationDefinition(operationNode) {
20
20
  var _operationNode$variab;
21
21
 
22
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
22
+ // See: https://github.com/graphql/graphql-js/issues/2203
23
+
24
+ /* c8 ignore next */
23
25
  const variableDefinitions =
24
26
  (_operationNode$variab = operationNode.variableDefinitions) !== null &&
25
27
  _operationNode$variab !== void 0
@@ -11,7 +11,9 @@ export function UniqueVariableNamesRule(context) {
11
11
  OperationDefinition(operationNode) {
12
12
  var _operationNode$variab;
13
13
 
14
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
14
+ // See: https://github.com/graphql/graphql-js/issues/2203
15
+
16
+ /* c8 ignore next */
15
17
  const variableDefinitions =
16
18
  (_operationNode$variab = operationNode.variableDefinitions) !== null &&
17
19
  _operationNode$variab !== void 0
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.0.1';
13
+ const version = '16.1.0';
14
14
  /**
15
15
  * An object containing the components of the GraphQL.js version string
16
16
  */
@@ -18,8 +18,8 @@ const version = '16.0.1';
18
18
  exports.version = version;
19
19
  const versionInfo = Object.freeze({
20
20
  major: 16,
21
- minor: 0,
22
- patch: 1,
21
+ minor: 1,
22
+ patch: 0,
23
23
  preReleaseTag: null,
24
24
  });
25
25
  exports.versionInfo = versionInfo;
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.0.1';
7
+ export const version = '16.1.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: 0,
15
- patch: 1,
14
+ minor: 1,
15
+ patch: 0,
16
16
  preReleaseTag: null,
17
17
  });