graphql 16.2.0 → 16.3.0-canary.pr.3479.undefined

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 (133) hide show
  1. package/error/GraphQLError.d.ts +17 -1
  2. package/error/GraphQLError.js +24 -9
  3. package/error/GraphQLError.mjs +24 -18
  4. package/execution/collectFields.d.ts +2 -2
  5. package/execution/collectFields.js +2 -2
  6. package/execution/collectFields.mjs +1 -1
  7. package/execution/execute.d.ts +5 -5
  8. package/execution/execute.js +12 -12
  9. package/execution/execute.mjs +14 -14
  10. package/execution/index.d.ts +1 -1
  11. package/execution/index.js +6 -0
  12. package/execution/index.mjs +1 -1
  13. package/execution/subscribe.d.ts +1 -1
  14. package/execution/subscribe.js +4 -4
  15. package/execution/subscribe.mjs +2 -2
  16. package/execution/values.d.ts +3 -5
  17. package/execution/values.js +4 -6
  18. package/execution/values.mjs +2 -4
  19. package/graphql.js +4 -4
  20. package/graphql.mjs +1 -1
  21. package/index.d.ts +3 -62
  22. package/index.js +6 -0
  23. package/index.mjs +60 -114
  24. package/jsutils/promiseReduce.mjs +1 -1
  25. package/language/index.d.ts +0 -1
  26. package/language/lexer.d.ts +1 -1
  27. package/language/lexer.js +2 -2
  28. package/language/lexer.mjs +2 -2
  29. package/language/parser.d.ts +40 -40
  30. package/language/parser.js +6 -6
  31. package/language/parser.mjs +4 -4
  32. package/language/predicates.d.ts +4 -4
  33. package/language/printLocation.d.ts +1 -1
  34. package/language/printLocation.mjs +1 -1
  35. package/language/printer.js +2 -2
  36. package/language/printer.mjs +1 -1
  37. package/language/source.js +2 -2
  38. package/language/source.mjs +1 -1
  39. package/language/visitor.js +10 -12
  40. package/language/visitor.mjs +9 -11
  41. package/package.json +3 -3
  42. package/type/assertName.mjs +1 -1
  43. package/type/definition.d.ts +14 -14
  44. package/type/definition.js +11 -11
  45. package/type/definition.mjs +8 -13
  46. package/type/directives.js +6 -6
  47. package/type/directives.mjs +4 -4
  48. package/type/index.d.ts +1 -28
  49. package/type/index.mjs +23 -42
  50. package/type/introspection.d.ts +2 -2
  51. package/type/introspection.js +4 -4
  52. package/type/introspection.mjs +8 -8
  53. package/type/scalars.js +2 -2
  54. package/type/scalars.mjs +1 -1
  55. package/type/schema.d.ts +3 -3
  56. package/type/schema.js +6 -6
  57. package/type/schema.mjs +7 -7
  58. package/type/validate.js +4 -4
  59. package/type/validate.mjs +7 -7
  60. package/utilities/TypeInfo.d.ts +9 -9
  61. package/utilities/TypeInfo.js +2 -2
  62. package/utilities/TypeInfo.mjs +7 -7
  63. package/utilities/astFromValue.js +4 -4
  64. package/utilities/astFromValue.mjs +3 -3
  65. package/utilities/buildASTSchema.d.ts +1 -1
  66. package/utilities/buildASTSchema.js +2 -2
  67. package/utilities/buildASTSchema.mjs +2 -2
  68. package/utilities/buildClientSchema.js +7 -7
  69. package/utilities/buildClientSchema.mjs +15 -15
  70. package/utilities/coerceInputValue.js +5 -5
  71. package/utilities/coerceInputValue.mjs +5 -5
  72. package/utilities/extendSchema.d.ts +1 -1
  73. package/utilities/extendSchema.js +10 -10
  74. package/utilities/extendSchema.mjs +31 -31
  75. package/utilities/findBreakingChanges.js +5 -20
  76. package/utilities/findBreakingChanges.mjs +9 -20
  77. package/utilities/getIntrospectionQuery.d.ts +4 -0
  78. package/utilities/getIntrospectionQuery.js +4 -0
  79. package/utilities/getIntrospectionQuery.mjs +4 -0
  80. package/utilities/getOperationRootType.d.ts +1 -1
  81. package/utilities/index.d.ts +0 -25
  82. package/utilities/index.mjs +21 -44
  83. package/utilities/introspectionFromSchema.d.ts +1 -1
  84. package/utilities/lexicographicSortSchema.js +2 -2
  85. package/utilities/lexicographicSortSchema.mjs +10 -10
  86. package/utilities/printSchema.d.ts +1 -1
  87. package/utilities/printSchema.js +5 -5
  88. package/utilities/printSchema.mjs +11 -11
  89. package/utilities/sortValueNode.d.ts +9 -0
  90. package/utilities/sortValueNode.js +47 -0
  91. package/utilities/sortValueNode.mjs +39 -0
  92. package/utilities/stripIgnoredCharacters.js +4 -4
  93. package/utilities/stripIgnoredCharacters.mjs +3 -3
  94. package/utilities/typeComparators.d.ts +1 -1
  95. package/utilities/typeComparators.mjs +3 -3
  96. package/utilities/typeFromAST.d.ts +4 -4
  97. package/utilities/typeFromAST.mjs +0 -8
  98. package/utilities/valueFromAST.d.ts +1 -1
  99. package/utilities/valueFromAST.js +2 -2
  100. package/utilities/valueFromAST.mjs +3 -3
  101. package/utilities/valueFromASTUntyped.d.ts +1 -1
  102. package/utilities/valueFromASTUntyped.mjs +1 -1
  103. package/validation/ValidationContext.d.ts +10 -10
  104. package/validation/index.d.ts +0 -29
  105. package/validation/index.mjs +29 -58
  106. package/validation/rules/FieldsOnCorrectTypeRule.js +2 -2
  107. package/validation/rules/FieldsOnCorrectTypeRule.mjs +3 -3
  108. package/validation/rules/KnownArgumentNamesRule.d.ts +1 -1
  109. package/validation/rules/KnownDirectivesRule.d.ts +1 -1
  110. package/validation/rules/KnownDirectivesRule.js +2 -2
  111. package/validation/rules/KnownDirectivesRule.mjs +1 -1
  112. package/validation/rules/KnownTypeNamesRule.d.ts +1 -1
  113. package/validation/rules/KnownTypeNamesRule.js +2 -2
  114. package/validation/rules/KnownTypeNamesRule.mjs +1 -1
  115. package/validation/rules/OverlappingFieldsCanBeMergedRule.js +42 -38
  116. package/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +42 -41
  117. package/validation/rules/PossibleFragmentSpreadsRule.js +2 -2
  118. package/validation/rules/PossibleFragmentSpreadsRule.mjs +1 -1
  119. package/validation/rules/PossibleTypeExtensionsRule.js +2 -2
  120. package/validation/rules/PossibleTypeExtensionsRule.mjs +5 -5
  121. package/validation/rules/ProvidedRequiredArgumentsRule.d.ts +1 -1
  122. package/validation/rules/ProvidedRequiredArgumentsRule.js +2 -2
  123. package/validation/rules/ProvidedRequiredArgumentsRule.mjs +1 -1
  124. package/validation/rules/UniqueFieldDefinitionNamesRule.mjs +2 -2
  125. package/validation/rules/ValuesOfCorrectTypeRule.js +2 -2
  126. package/validation/rules/ValuesOfCorrectTypeRule.mjs +5 -5
  127. package/validation/rules/VariablesInAllowedPositionRule.js +2 -2
  128. package/validation/rules/VariablesInAllowedPositionRule.mjs +1 -1
  129. package/validation/specifiedRules.d.ts +1 -1
  130. package/validation/specifiedRules.js +47 -47
  131. package/validation/specifiedRules.mjs +41 -41
  132. package/version.js +2 -2
  133. package/version.mjs +2 -2
@@ -0,0 +1,39 @@
1
+ import { naturalCompare } from '../jsutils/naturalCompare.mjs';
2
+ import { Kind } from '../language/kinds.mjs';
3
+ /**
4
+ * Sort ValueNode.
5
+ *
6
+ * This function returns a sorted copy of the given ValueNode.
7
+ *
8
+ * @internal
9
+ */
10
+
11
+ export function sortValueNode(valueNode) {
12
+ switch (valueNode.kind) {
13
+ case Kind.OBJECT:
14
+ return { ...valueNode, fields: sortFields(valueNode.fields) };
15
+
16
+ case Kind.LIST:
17
+ return { ...valueNode, values: valueNode.values.map(sortValueNode) };
18
+
19
+ case Kind.INT:
20
+ case Kind.FLOAT:
21
+ case Kind.STRING:
22
+ case Kind.BOOLEAN:
23
+ case Kind.NULL:
24
+ case Kind.ENUM:
25
+ case Kind.VARIABLE:
26
+ return valueNode;
27
+ }
28
+ }
29
+
30
+ function sortFields(fields) {
31
+ return fields
32
+ .map((fieldNode) => ({
33
+ ...fieldNode,
34
+ value: sortValueNode(fieldNode.value),
35
+ }))
36
+ .sort((fieldA, fieldB) =>
37
+ naturalCompare(fieldA.name.value, fieldB.name.value),
38
+ );
39
+ }
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', {
5
5
  });
6
6
  exports.stripIgnoredCharacters = stripIgnoredCharacters;
7
7
 
8
- var _source = require('../language/source.js');
9
-
10
- var _tokenKind = require('../language/tokenKind.js');
8
+ var _blockString = require('../language/blockString.js');
11
9
 
12
10
  var _lexer = require('../language/lexer.js');
13
11
 
14
- var _blockString = require('../language/blockString.js');
12
+ var _source = require('../language/source.js');
13
+
14
+ var _tokenKind = require('../language/tokenKind.js');
15
15
 
16
16
  /**
17
17
  * Strips characters that are not significant to the validity or execution
@@ -1,7 +1,7 @@
1
- import { Source, isSource } from '../language/source.mjs';
2
- import { TokenKind } from '../language/tokenKind.mjs';
3
- import { Lexer, isPunctuatorTokenKind } from '../language/lexer.mjs';
4
1
  import { printBlockString } from '../language/blockString.mjs';
2
+ import { isPunctuatorTokenKind, Lexer } from '../language/lexer.mjs';
3
+ import { isSource, Source } from '../language/source.mjs';
4
+ import { TokenKind } from '../language/tokenKind.mjs';
5
5
  /**
6
6
  * Strips characters that are not significant to the validity or execution
7
7
  * of a GraphQL document:
@@ -1,5 +1,5 @@
1
+ import type { GraphQLCompositeType, GraphQLType } from '../type/definition';
1
2
  import type { GraphQLSchema } from '../type/schema';
2
- import type { GraphQLType, GraphQLCompositeType } from '../type/definition';
3
3
  /**
4
4
  * Provided two types, return true if the types are equal (invariant).
5
5
  */
@@ -1,14 +1,14 @@
1
1
  import {
2
+ isAbstractType,
2
3
  isInterfaceType,
3
- isObjectType,
4
4
  isListType,
5
5
  isNonNullType,
6
- isAbstractType,
6
+ isObjectType,
7
7
  } from '../type/definition.mjs';
8
+
8
9
  /**
9
10
  * Provided two types, return true if the types are equal (invariant).
10
11
  */
11
-
12
12
  export function isEqualType(typeA, typeB) {
13
13
  // Equivalent types are equal.
14
14
  if (typeA === typeB) {
@@ -1,12 +1,12 @@
1
1
  import type {
2
- TypeNode,
3
- NamedTypeNode,
4
2
  ListTypeNode,
3
+ NamedTypeNode,
5
4
  NonNullTypeNode,
5
+ TypeNode,
6
6
  } from '../language/ast';
7
- import type { GraphQLSchema } from '../type/schema';
8
- import type { GraphQLType, GraphQLNamedType } from '../type/definition';
7
+ import type { GraphQLNamedType, GraphQLType } from '../type/definition';
9
8
  import { GraphQLList, GraphQLNonNull } from '../type/definition';
9
+ import type { GraphQLSchema } from '../type/schema';
10
10
  /**
11
11
  * Given a Schema and an AST node describing a type, return a GraphQLType
12
12
  * definition which applies to that type. For example, if provided the parsed
@@ -1,13 +1,5 @@
1
1
  import { Kind } from '../language/kinds.mjs';
2
2
  import { GraphQLList, GraphQLNonNull } from '../type/definition.mjs';
3
- /**
4
- * Given a Schema and an AST node describing a type, return a GraphQLType
5
- * definition which applies to that type. For example, if provided the parsed
6
- * AST node for `[User]`, a GraphQLList instance will be returned, containing
7
- * the type called "User" found in the schema. If a type called "User" is not
8
- * found in the schema, then undefined will be returned.
9
- */
10
-
11
3
  export function typeFromAST(schema, typeNode) {
12
4
  switch (typeNode.kind) {
13
5
  case Kind.LIST_TYPE: {
@@ -1,7 +1,7 @@
1
+ import type { Maybe } from '../jsutils/Maybe';
1
2
  import type { ObjMap } from '../jsutils/ObjMap';
2
3
  import type { ValueNode } from '../language/ast';
3
4
  import type { GraphQLInputType } from '../type/definition';
4
- import type { Maybe } from '../jsutils/Maybe';
5
5
  /**
6
6
  * Produces a JavaScript value given a GraphQL Value AST.
7
7
  *
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', {
5
5
  });
6
6
  exports.valueFromAST = valueFromAST;
7
7
 
8
- var _keyMap = require('../jsutils/keyMap.js');
9
-
10
8
  var _inspect = require('../jsutils/inspect.js');
11
9
 
12
10
  var _invariant = require('../jsutils/invariant.js');
13
11
 
12
+ var _keyMap = require('../jsutils/keyMap.js');
13
+
14
14
  var _kinds = require('../language/kinds.js');
15
15
 
16
16
  var _definition = require('../type/definition.js');
@@ -1,14 +1,13 @@
1
- import { keyMap } from '../jsutils/keyMap.mjs';
2
1
  import { inspect } from '../jsutils/inspect.mjs';
3
2
  import { invariant } from '../jsutils/invariant.mjs';
3
+ import { keyMap } from '../jsutils/keyMap.mjs';
4
4
  import { Kind } from '../language/kinds.mjs';
5
5
  import {
6
- isLeafType,
7
6
  isInputObjectType,
7
+ isLeafType,
8
8
  isListType,
9
9
  isNonNullType,
10
10
  } from '../type/definition.mjs';
11
-
12
11
  /**
13
12
  * Produces a JavaScript value given a GraphQL Value AST.
14
13
  *
@@ -29,6 +28,7 @@ import {
29
28
  * | NullValue | null |
30
29
  *
31
30
  */
31
+
32
32
  export function valueFromAST(valueNode, type, variables) {
33
33
  if (!valueNode) {
34
34
  // When there is no node, then there is also no value.
@@ -1,5 +1,5 @@
1
- import type { ObjMap } from '../jsutils/ObjMap';
2
1
  import type { Maybe } from '../jsutils/Maybe';
2
+ import type { ObjMap } from '../jsutils/ObjMap';
3
3
  import type { ValueNode } from '../language/ast';
4
4
  /**
5
5
  * Produces a JavaScript value given a GraphQL Value AST.
@@ -1,6 +1,5 @@
1
1
  import { keyValMap } from '../jsutils/keyValMap.mjs';
2
2
  import { Kind } from '../language/kinds.mjs';
3
-
4
3
  /**
5
4
  * Produces a JavaScript value given a GraphQL Value AST.
6
5
  *
@@ -17,6 +16,7 @@ import { Kind } from '../language/kinds.mjs';
17
16
  * | Null | null |
18
17
  *
19
18
  */
19
+
20
20
  export function valueFromASTUntyped(valueNode, variables) {
21
21
  switch (valueNode.kind) {
22
22
  case Kind.NULL:
@@ -1,24 +1,24 @@
1
1
  import type { Maybe } from '../jsutils/Maybe';
2
2
  import type { GraphQLError } from '../error/GraphQLError';
3
- import type { ASTVisitor } from '../language/visitor';
4
3
  import type {
5
4
  DocumentNode,
5
+ FragmentDefinitionNode,
6
+ FragmentSpreadNode,
6
7
  OperationDefinitionNode,
7
- VariableNode,
8
8
  SelectionSetNode,
9
- FragmentSpreadNode,
10
- FragmentDefinitionNode,
9
+ VariableNode,
11
10
  } from '../language/ast';
12
- import type { GraphQLSchema } from '../type/schema';
13
- import type { GraphQLDirective } from '../type/directives';
11
+ import type { ASTVisitor } from '../language/visitor';
14
12
  import type {
15
- GraphQLInputType,
16
- GraphQLOutputType,
17
- GraphQLCompositeType,
18
- GraphQLField,
19
13
  GraphQLArgument,
14
+ GraphQLCompositeType,
20
15
  GraphQLEnumValue,
16
+ GraphQLField,
17
+ GraphQLInputType,
18
+ GraphQLOutputType,
21
19
  } from '../type/definition';
20
+ import type { GraphQLDirective } from '../type/directives';
21
+ import type { GraphQLSchema } from '../type/schema';
22
22
  import { TypeInfo } from '../utilities/TypeInfo';
23
23
  declare type NodeWithSelectionSet =
24
24
  | OperationDefinitionNode
@@ -1,61 +1,33 @@
1
1
  export { validate } from './validate';
2
2
  export { ValidationContext } from './ValidationContext';
3
3
  export type { ValidationRule } from './ValidationContext';
4
- /** All validation rules in the GraphQL Specification. */
5
4
  export { specifiedRules } from './specifiedRules';
6
- /** Spec Section: "Executable Definitions" */
7
5
  export { ExecutableDefinitionsRule } from './rules/ExecutableDefinitionsRule';
8
- /** Spec Section: "Field Selections on Objects, Interfaces, and Unions Types" */
9
6
  export { FieldsOnCorrectTypeRule } from './rules/FieldsOnCorrectTypeRule';
10
- /** Spec Section: "Fragments on Composite Types" */
11
7
  export { FragmentsOnCompositeTypesRule } from './rules/FragmentsOnCompositeTypesRule';
12
- /** Spec Section: "Argument Names" */
13
8
  export { KnownArgumentNamesRule } from './rules/KnownArgumentNamesRule';
14
- /** Spec Section: "Directives Are Defined" */
15
9
  export { KnownDirectivesRule } from './rules/KnownDirectivesRule';
16
- /** Spec Section: "Fragment spread target defined" */
17
10
  export { KnownFragmentNamesRule } from './rules/KnownFragmentNamesRule';
18
- /** Spec Section: "Fragment Spread Type Existence" */
19
11
  export { KnownTypeNamesRule } from './rules/KnownTypeNamesRule';
20
- /** Spec Section: "Lone Anonymous Operation" */
21
12
  export { LoneAnonymousOperationRule } from './rules/LoneAnonymousOperationRule';
22
- /** Spec Section: "Fragments must not form cycles" */
23
13
  export { NoFragmentCyclesRule } from './rules/NoFragmentCyclesRule';
24
- /** Spec Section: "All Variable Used Defined" */
25
14
  export { NoUndefinedVariablesRule } from './rules/NoUndefinedVariablesRule';
26
- /** Spec Section: "Fragments must be used" */
27
15
  export { NoUnusedFragmentsRule } from './rules/NoUnusedFragmentsRule';
28
- /** Spec Section: "All Variables Used" */
29
16
  export { NoUnusedVariablesRule } from './rules/NoUnusedVariablesRule';
30
- /** Spec Section: "Field Selection Merging" */
31
17
  export { OverlappingFieldsCanBeMergedRule } from './rules/OverlappingFieldsCanBeMergedRule';
32
- /** Spec Section: "Fragment spread is possible" */
33
18
  export { PossibleFragmentSpreadsRule } from './rules/PossibleFragmentSpreadsRule';
34
- /** Spec Section: "Argument Optionality" */
35
19
  export { ProvidedRequiredArgumentsRule } from './rules/ProvidedRequiredArgumentsRule';
36
- /** Spec Section: "Leaf Field Selections" */
37
20
  export { ScalarLeafsRule } from './rules/ScalarLeafsRule';
38
- /** Spec Section: "Subscriptions with Single Root Field" */
39
21
  export { SingleFieldSubscriptionsRule } from './rules/SingleFieldSubscriptionsRule';
40
- /** Spec Section: "Argument Uniqueness" */
41
22
  export { UniqueArgumentNamesRule } from './rules/UniqueArgumentNamesRule';
42
- /** Spec Section: "Directives Are Unique Per Location" */
43
23
  export { UniqueDirectivesPerLocationRule } from './rules/UniqueDirectivesPerLocationRule';
44
- /** Spec Section: "Fragment Name Uniqueness" */
45
24
  export { UniqueFragmentNamesRule } from './rules/UniqueFragmentNamesRule';
46
- /** Spec Section: "Input Object Field Uniqueness" */
47
25
  export { UniqueInputFieldNamesRule } from './rules/UniqueInputFieldNamesRule';
48
- /** Spec Section: "Operation Name Uniqueness" */
49
26
  export { UniqueOperationNamesRule } from './rules/UniqueOperationNamesRule';
50
- /** Spec Section: "Variable Uniqueness" */
51
27
  export { UniqueVariableNamesRule } from './rules/UniqueVariableNamesRule';
52
- /** Spec Section: "Values Type Correctness" */
53
28
  export { ValuesOfCorrectTypeRule } from './rules/ValuesOfCorrectTypeRule';
54
- /** Spec Section: "Variables are Input Types" */
55
29
  export { VariablesAreInputTypesRule } from './rules/VariablesAreInputTypesRule';
56
- /** Spec Section: "All Variable Usages Are Allowed" */
57
30
  export { VariablesInAllowedPositionRule } from './rules/VariablesInAllowedPositionRule';
58
- /** SDL-specific validation rules */
59
31
  export { LoneSchemaDefinitionRule } from './rules/LoneSchemaDefinitionRule';
60
32
  export { UniqueOperationTypesRule } from './rules/UniqueOperationTypesRule';
61
33
  export { UniqueTypeNamesRule } from './rules/UniqueTypeNamesRule';
@@ -64,6 +36,5 @@ export { UniqueFieldDefinitionNamesRule } from './rules/UniqueFieldDefinitionNam
64
36
  export { UniqueArgumentDefinitionNamesRule } from './rules/UniqueArgumentDefinitionNamesRule';
65
37
  export { UniqueDirectiveNamesRule } from './rules/UniqueDirectiveNamesRule';
66
38
  export { PossibleTypeExtensionsRule } from './rules/PossibleTypeExtensionsRule';
67
- /** Optional rules not defined by the GraphQL Specification */
68
39
  export { NoDeprecatedCustomRule } from './rules/custom/NoDeprecatedCustomRule';
69
40
  export { NoSchemaIntrospectionCustomRule } from './rules/custom/NoSchemaIntrospectionCustomRule';
@@ -1,87 +1,59 @@
1
1
  export { validate } from './validate.mjs';
2
2
  export { ValidationContext } from './ValidationContext.mjs';
3
+ // All validation rules in the GraphQL Specification.
4
+ export { specifiedRules } from './specifiedRules.mjs'; // Spec Section: "Executable Definitions"
3
5
 
4
- /** All validation rules in the GraphQL Specification. */
5
- export { specifiedRules } from './specifiedRules.mjs';
6
- /** Spec Section: "Executable Definitions" */
6
+ export { ExecutableDefinitionsRule } from './rules/ExecutableDefinitionsRule.mjs'; // Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"
7
7
 
8
- export { ExecutableDefinitionsRule } from './rules/ExecutableDefinitionsRule.mjs';
9
- /** Spec Section: "Field Selections on Objects, Interfaces, and Unions Types" */
8
+ export { FieldsOnCorrectTypeRule } from './rules/FieldsOnCorrectTypeRule.mjs'; // Spec Section: "Fragments on Composite Types"
10
9
 
11
- export { FieldsOnCorrectTypeRule } from './rules/FieldsOnCorrectTypeRule.mjs';
12
- /** Spec Section: "Fragments on Composite Types" */
10
+ export { FragmentsOnCompositeTypesRule } from './rules/FragmentsOnCompositeTypesRule.mjs'; // Spec Section: "Argument Names"
13
11
 
14
- export { FragmentsOnCompositeTypesRule } from './rules/FragmentsOnCompositeTypesRule.mjs';
15
- /** Spec Section: "Argument Names" */
12
+ export { KnownArgumentNamesRule } from './rules/KnownArgumentNamesRule.mjs'; // Spec Section: "Directives Are Defined"
16
13
 
17
- export { KnownArgumentNamesRule } from './rules/KnownArgumentNamesRule.mjs';
18
- /** Spec Section: "Directives Are Defined" */
14
+ export { KnownDirectivesRule } from './rules/KnownDirectivesRule.mjs'; // Spec Section: "Fragment spread target defined"
19
15
 
20
- export { KnownDirectivesRule } from './rules/KnownDirectivesRule.mjs';
21
- /** Spec Section: "Fragment spread target defined" */
16
+ export { KnownFragmentNamesRule } from './rules/KnownFragmentNamesRule.mjs'; // Spec Section: "Fragment Spread Type Existence"
22
17
 
23
- export { KnownFragmentNamesRule } from './rules/KnownFragmentNamesRule.mjs';
24
- /** Spec Section: "Fragment Spread Type Existence" */
18
+ export { KnownTypeNamesRule } from './rules/KnownTypeNamesRule.mjs'; // Spec Section: "Lone Anonymous Operation"
25
19
 
26
- export { KnownTypeNamesRule } from './rules/KnownTypeNamesRule.mjs';
27
- /** Spec Section: "Lone Anonymous Operation" */
20
+ export { LoneAnonymousOperationRule } from './rules/LoneAnonymousOperationRule.mjs'; // Spec Section: "Fragments must not form cycles"
28
21
 
29
- export { LoneAnonymousOperationRule } from './rules/LoneAnonymousOperationRule.mjs';
30
- /** Spec Section: "Fragments must not form cycles" */
22
+ export { NoFragmentCyclesRule } from './rules/NoFragmentCyclesRule.mjs'; // Spec Section: "All Variable Used Defined"
31
23
 
32
- export { NoFragmentCyclesRule } from './rules/NoFragmentCyclesRule.mjs';
33
- /** Spec Section: "All Variable Used Defined" */
24
+ export { NoUndefinedVariablesRule } from './rules/NoUndefinedVariablesRule.mjs'; // Spec Section: "Fragments must be used"
34
25
 
35
- export { NoUndefinedVariablesRule } from './rules/NoUndefinedVariablesRule.mjs';
36
- /** Spec Section: "Fragments must be used" */
26
+ export { NoUnusedFragmentsRule } from './rules/NoUnusedFragmentsRule.mjs'; // Spec Section: "All Variables Used"
37
27
 
38
- export { NoUnusedFragmentsRule } from './rules/NoUnusedFragmentsRule.mjs';
39
- /** Spec Section: "All Variables Used" */
28
+ export { NoUnusedVariablesRule } from './rules/NoUnusedVariablesRule.mjs'; // Spec Section: "Field Selection Merging"
40
29
 
41
- export { NoUnusedVariablesRule } from './rules/NoUnusedVariablesRule.mjs';
42
- /** Spec Section: "Field Selection Merging" */
30
+ export { OverlappingFieldsCanBeMergedRule } from './rules/OverlappingFieldsCanBeMergedRule.mjs'; // Spec Section: "Fragment spread is possible"
43
31
 
44
- export { OverlappingFieldsCanBeMergedRule } from './rules/OverlappingFieldsCanBeMergedRule.mjs';
45
- /** Spec Section: "Fragment spread is possible" */
32
+ export { PossibleFragmentSpreadsRule } from './rules/PossibleFragmentSpreadsRule.mjs'; // Spec Section: "Argument Optionality"
46
33
 
47
- export { PossibleFragmentSpreadsRule } from './rules/PossibleFragmentSpreadsRule.mjs';
48
- /** Spec Section: "Argument Optionality" */
34
+ export { ProvidedRequiredArgumentsRule } from './rules/ProvidedRequiredArgumentsRule.mjs'; // Spec Section: "Leaf Field Selections"
49
35
 
50
- export { ProvidedRequiredArgumentsRule } from './rules/ProvidedRequiredArgumentsRule.mjs';
51
- /** Spec Section: "Leaf Field Selections" */
36
+ export { ScalarLeafsRule } from './rules/ScalarLeafsRule.mjs'; // Spec Section: "Subscriptions with Single Root Field"
52
37
 
53
- export { ScalarLeafsRule } from './rules/ScalarLeafsRule.mjs';
54
- /** Spec Section: "Subscriptions with Single Root Field" */
38
+ export { SingleFieldSubscriptionsRule } from './rules/SingleFieldSubscriptionsRule.mjs'; // Spec Section: "Argument Uniqueness"
55
39
 
56
- export { SingleFieldSubscriptionsRule } from './rules/SingleFieldSubscriptionsRule.mjs';
57
- /** Spec Section: "Argument Uniqueness" */
40
+ export { UniqueArgumentNamesRule } from './rules/UniqueArgumentNamesRule.mjs'; // Spec Section: "Directives Are Unique Per Location"
58
41
 
59
- export { UniqueArgumentNamesRule } from './rules/UniqueArgumentNamesRule.mjs';
60
- /** Spec Section: "Directives Are Unique Per Location" */
42
+ export { UniqueDirectivesPerLocationRule } from './rules/UniqueDirectivesPerLocationRule.mjs'; // Spec Section: "Fragment Name Uniqueness"
61
43
 
62
- export { UniqueDirectivesPerLocationRule } from './rules/UniqueDirectivesPerLocationRule.mjs';
63
- /** Spec Section: "Fragment Name Uniqueness" */
44
+ export { UniqueFragmentNamesRule } from './rules/UniqueFragmentNamesRule.mjs'; // Spec Section: "Input Object Field Uniqueness"
64
45
 
65
- export { UniqueFragmentNamesRule } from './rules/UniqueFragmentNamesRule.mjs';
66
- /** Spec Section: "Input Object Field Uniqueness" */
46
+ export { UniqueInputFieldNamesRule } from './rules/UniqueInputFieldNamesRule.mjs'; // Spec Section: "Operation Name Uniqueness"
67
47
 
68
- export { UniqueInputFieldNamesRule } from './rules/UniqueInputFieldNamesRule.mjs';
69
- /** Spec Section: "Operation Name Uniqueness" */
48
+ export { UniqueOperationNamesRule } from './rules/UniqueOperationNamesRule.mjs'; // Spec Section: "Variable Uniqueness"
70
49
 
71
- export { UniqueOperationNamesRule } from './rules/UniqueOperationNamesRule.mjs';
72
- /** Spec Section: "Variable Uniqueness" */
50
+ export { UniqueVariableNamesRule } from './rules/UniqueVariableNamesRule.mjs'; // Spec Section: "Values Type Correctness"
73
51
 
74
- export { UniqueVariableNamesRule } from './rules/UniqueVariableNamesRule.mjs';
75
- /** Spec Section: "Values Type Correctness" */
52
+ export { ValuesOfCorrectTypeRule } from './rules/ValuesOfCorrectTypeRule.mjs'; // Spec Section: "Variables are Input Types"
76
53
 
77
- export { ValuesOfCorrectTypeRule } from './rules/ValuesOfCorrectTypeRule.mjs';
78
- /** Spec Section: "Variables are Input Types" */
54
+ export { VariablesAreInputTypesRule } from './rules/VariablesAreInputTypesRule.mjs'; // Spec Section: "All Variable Usages Are Allowed"
79
55
 
80
- export { VariablesAreInputTypesRule } from './rules/VariablesAreInputTypesRule.mjs';
81
- /** Spec Section: "All Variable Usages Are Allowed" */
82
-
83
- export { VariablesInAllowedPositionRule } from './rules/VariablesInAllowedPositionRule.mjs';
84
- /** SDL-specific validation rules */
56
+ export { VariablesInAllowedPositionRule } from './rules/VariablesInAllowedPositionRule.mjs'; // SDL-specific validation rules
85
57
 
86
58
  export { LoneSchemaDefinitionRule } from './rules/LoneSchemaDefinitionRule.mjs';
87
59
  export { UniqueOperationTypesRule } from './rules/UniqueOperationTypesRule.mjs';
@@ -90,8 +62,7 @@ export { UniqueEnumValueNamesRule } from './rules/UniqueEnumValueNamesRule.mjs';
90
62
  export { UniqueFieldDefinitionNamesRule } from './rules/UniqueFieldDefinitionNamesRule.mjs';
91
63
  export { UniqueArgumentDefinitionNamesRule } from './rules/UniqueArgumentDefinitionNamesRule.mjs';
92
64
  export { UniqueDirectiveNamesRule } from './rules/UniqueDirectiveNamesRule.mjs';
93
- export { PossibleTypeExtensionsRule } from './rules/PossibleTypeExtensionsRule.mjs';
94
- /** Optional rules not defined by the GraphQL Specification */
65
+ export { PossibleTypeExtensionsRule } from './rules/PossibleTypeExtensionsRule.mjs'; // Optional rules not defined by the GraphQL Specification
95
66
 
96
67
  export { NoDeprecatedCustomRule } from './rules/custom/NoDeprecatedCustomRule.mjs';
97
68
  export { NoSchemaIntrospectionCustomRule } from './rules/custom/NoSchemaIntrospectionCustomRule.mjs';
@@ -7,10 +7,10 @@ exports.FieldsOnCorrectTypeRule = FieldsOnCorrectTypeRule;
7
7
 
8
8
  var _didYouMean = require('../../jsutils/didYouMean.js');
9
9
 
10
- var _suggestionList = require('../../jsutils/suggestionList.js');
11
-
12
10
  var _naturalCompare = require('../../jsutils/naturalCompare.js');
13
11
 
12
+ var _suggestionList = require('../../jsutils/suggestionList.js');
13
+
14
14
  var _GraphQLError = require('../../error/GraphQLError.js');
15
15
 
16
16
  var _definition = require('../../type/definition.js');
@@ -1,11 +1,11 @@
1
1
  import { didYouMean } from '../../jsutils/didYouMean.mjs';
2
- import { suggestionList } from '../../jsutils/suggestionList.mjs';
3
2
  import { naturalCompare } from '../../jsutils/naturalCompare.mjs';
3
+ import { suggestionList } from '../../jsutils/suggestionList.mjs';
4
4
  import { GraphQLError } from '../../error/GraphQLError.mjs';
5
5
  import {
6
- isObjectType,
7
- isInterfaceType,
8
6
  isAbstractType,
7
+ isInterfaceType,
8
+ isObjectType,
9
9
  } from '../../type/definition.mjs';
10
10
 
11
11
  /**
@@ -1,7 +1,7 @@
1
1
  import type { ASTVisitor } from '../../language/visitor';
2
2
  import type {
3
- ValidationContext,
4
3
  SDLValidationContext,
4
+ ValidationContext,
5
5
  } from '../ValidationContext';
6
6
  /**
7
7
  * Known argument names
@@ -1,7 +1,7 @@
1
1
  import type { ASTVisitor } from '../../language/visitor';
2
2
  import type {
3
- ValidationContext,
4
3
  SDLValidationContext,
4
+ ValidationContext,
5
5
  } from '../ValidationContext';
6
6
  /**
7
7
  * Known directives
@@ -11,12 +11,12 @@ var _invariant = require('../../jsutils/invariant.js');
11
11
 
12
12
  var _GraphQLError = require('../../error/GraphQLError.js');
13
13
 
14
- var _kinds = require('../../language/kinds.js');
15
-
16
14
  var _ast = require('../../language/ast.js');
17
15
 
18
16
  var _directiveLocation = require('../../language/directiveLocation.js');
19
17
 
18
+ var _kinds = require('../../language/kinds.js');
19
+
20
20
  var _directives = require('../../type/directives.js');
21
21
 
22
22
  /**
@@ -1,9 +1,9 @@
1
1
  import { inspect } from '../../jsutils/inspect.mjs';
2
2
  import { invariant } from '../../jsutils/invariant.mjs';
3
3
  import { GraphQLError } from '../../error/GraphQLError.mjs';
4
- import { Kind } from '../../language/kinds.mjs';
5
4
  import { OperationTypeNode } from '../../language/ast.mjs';
6
5
  import { DirectiveLocation } from '../../language/directiveLocation.mjs';
6
+ import { Kind } from '../../language/kinds.mjs';
7
7
  import { specifiedDirectives } from '../../type/directives.mjs';
8
8
 
9
9
  /**
@@ -1,7 +1,7 @@
1
1
  import type { ASTVisitor } from '../../language/visitor';
2
2
  import type {
3
- ValidationContext,
4
3
  SDLValidationContext,
4
+ ValidationContext,
5
5
  } from '../ValidationContext';
6
6
  /**
7
7
  * Known type names
@@ -13,10 +13,10 @@ var _GraphQLError = require('../../error/GraphQLError.js');
13
13
 
14
14
  var _predicates = require('../../language/predicates.js');
15
15
 
16
- var _scalars = require('../../type/scalars.js');
17
-
18
16
  var _introspection = require('../../type/introspection.js');
19
17
 
18
+ var _scalars = require('../../type/scalars.js');
19
+
20
20
  /**
21
21
  * Known type names
22
22
  *
@@ -6,8 +6,8 @@ import {
6
6
  isTypeSystemDefinitionNode,
7
7
  isTypeSystemExtensionNode,
8
8
  } from '../../language/predicates.mjs';
9
- import { specifiedScalarTypes } from '../../type/scalars.mjs';
10
9
  import { introspectionTypes } from '../../type/introspection.mjs';
10
+ import { specifiedScalarTypes } from '../../type/scalars.mjs';
11
11
 
12
12
  /**
13
13
  * Known type names