graphql 16.2.0 → 16.3.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 (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 +1 -1
  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
@@ -1,59 +1,59 @@
1
1
  import type { Maybe } from '../jsutils/Maybe';
2
2
  import type { GraphQLError } from '../error/GraphQLError';
3
3
  import type {
4
- Token,
5
- NameNode,
6
- VariableNode,
7
- DocumentNode,
8
- DefinitionNode,
9
- OperationDefinitionNode,
10
- VariableDefinitionNode,
11
- SelectionSetNode,
12
- SelectionNode,
13
- FieldNode,
14
4
  ArgumentNode,
15
5
  ConstArgumentNode,
16
- FragmentSpreadNode,
17
- InlineFragmentNode,
18
- FragmentDefinitionNode,
19
- ValueNode,
20
- ConstValueNode,
21
- StringValueNode,
22
- ListValueNode,
6
+ ConstDirectiveNode,
23
7
  ConstListValueNode,
24
- ObjectValueNode,
25
- ConstObjectValueNode,
26
- ObjectFieldNode,
27
8
  ConstObjectFieldNode,
9
+ ConstObjectValueNode,
10
+ ConstValueNode,
11
+ DefinitionNode,
12
+ DirectiveDefinitionNode,
28
13
  DirectiveNode,
29
- ConstDirectiveNode,
30
- TypeNode,
31
- NamedTypeNode,
32
- SchemaDefinitionNode,
33
- OperationTypeDefinitionNode,
34
- ScalarTypeDefinitionNode,
35
- ObjectTypeDefinitionNode,
36
- FieldDefinitionNode,
37
- InputValueDefinitionNode,
38
- InterfaceTypeDefinitionNode,
39
- UnionTypeDefinitionNode,
14
+ DocumentNode,
40
15
  EnumTypeDefinitionNode,
16
+ EnumTypeExtensionNode,
41
17
  EnumValueDefinitionNode,
18
+ FieldDefinitionNode,
19
+ FieldNode,
20
+ FragmentDefinitionNode,
21
+ FragmentSpreadNode,
22
+ InlineFragmentNode,
42
23
  InputObjectTypeDefinitionNode,
43
- DirectiveDefinitionNode,
44
- TypeSystemExtensionNode,
45
- SchemaExtensionNode,
46
- ScalarTypeExtensionNode,
47
- ObjectTypeExtensionNode,
24
+ InputObjectTypeExtensionNode,
25
+ InputValueDefinitionNode,
26
+ InterfaceTypeDefinitionNode,
48
27
  InterfaceTypeExtensionNode,
28
+ ListValueNode,
29
+ NamedTypeNode,
30
+ NameNode,
31
+ ObjectFieldNode,
32
+ ObjectTypeDefinitionNode,
33
+ ObjectTypeExtensionNode,
34
+ ObjectValueNode,
35
+ OperationDefinitionNode,
36
+ OperationTypeDefinitionNode,
37
+ ScalarTypeDefinitionNode,
38
+ ScalarTypeExtensionNode,
39
+ SchemaDefinitionNode,
40
+ SchemaExtensionNode,
41
+ SelectionNode,
42
+ SelectionSetNode,
43
+ StringValueNode,
44
+ Token,
45
+ TypeNode,
46
+ TypeSystemExtensionNode,
47
+ UnionTypeDefinitionNode,
49
48
  UnionTypeExtensionNode,
50
- EnumTypeExtensionNode,
51
- InputObjectTypeExtensionNode,
49
+ ValueNode,
50
+ VariableDefinitionNode,
51
+ VariableNode,
52
52
  } from './ast';
53
53
  import { Location, OperationTypeNode } from './ast';
54
- import { TokenKind } from './tokenKind';
55
- import { Source } from './source';
56
54
  import { Lexer } from './lexer';
55
+ import { Source } from './source';
56
+ import { TokenKind } from './tokenKind';
57
57
  /**
58
58
  * Configuration options to control parser behavior
59
59
  */
@@ -11,18 +11,18 @@ exports.parseValue = parseValue;
11
11
 
12
12
  var _syntaxError = require('../error/syntaxError.js');
13
13
 
14
- var _kinds = require('./kinds.js');
15
-
16
14
  var _ast = require('./ast.js');
17
15
 
18
- var _tokenKind = require('./tokenKind.js');
19
-
20
- var _source = require('./source.js');
21
-
22
16
  var _directiveLocation = require('./directiveLocation.js');
23
17
 
18
+ var _kinds = require('./kinds.js');
19
+
24
20
  var _lexer = require('./lexer.js');
25
21
 
22
+ var _source = require('./source.js');
23
+
24
+ var _tokenKind = require('./tokenKind.js');
25
+
26
26
  /**
27
27
  * Given a GraphQL source, parses it into a Document.
28
28
  * Throws GraphQLError if a syntax error is encountered.
@@ -1,10 +1,10 @@
1
1
  import { syntaxError } from '../error/syntaxError.mjs';
2
- import { Kind } from './kinds.mjs';
3
2
  import { Location, OperationTypeNode } from './ast.mjs';
4
- import { TokenKind } from './tokenKind.mjs';
5
- import { Source, isSource } from './source.mjs';
6
3
  import { DirectiveLocation } from './directiveLocation.mjs';
7
- import { Lexer, isPunctuatorTokenKind } from './lexer.mjs';
4
+ import { Kind } from './kinds.mjs';
5
+ import { isPunctuatorTokenKind, Lexer } from './lexer.mjs';
6
+ import { isSource, Source } from './source.mjs';
7
+ import { TokenKind } from './tokenKind.mjs';
8
8
  /**
9
9
  * Configuration options to control parser behavior
10
10
  */
@@ -1,15 +1,15 @@
1
1
  import type {
2
2
  ASTNode,
3
+ ConstValueNode,
3
4
  DefinitionNode,
4
5
  ExecutableDefinitionNode,
5
6
  SelectionNode,
6
- ValueNode,
7
- ConstValueNode,
7
+ TypeDefinitionNode,
8
+ TypeExtensionNode,
8
9
  TypeNode,
9
10
  TypeSystemDefinitionNode,
10
- TypeDefinitionNode,
11
11
  TypeSystemExtensionNode,
12
- TypeExtensionNode,
12
+ ValueNode,
13
13
  } from './ast';
14
14
  export declare function isDefinitionNode(node: ASTNode): node is DefinitionNode;
15
15
  export declare function isExecutableDefinitionNode(
@@ -1,6 +1,6 @@
1
- import type { Source } from './source';
2
1
  import type { Location } from './ast';
3
2
  import type { SourceLocation } from './location';
3
+ import type { Source } from './source';
4
4
  /**
5
5
  * Render a helpful description of the location in the GraphQL Source document.
6
6
  */
@@ -1,8 +1,8 @@
1
1
  import { getLocation } from './location.mjs';
2
+
2
3
  /**
3
4
  * Render a helpful description of the location in the GraphQL Source document.
4
5
  */
5
-
6
6
  export function printLocation(location) {
7
7
  return printSourceLocation(
8
8
  location.source,
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', {
5
5
  });
6
6
  exports.print = print;
7
7
 
8
- var _visitor = require('./visitor.js');
9
-
10
8
  var _blockString = require('./blockString.js');
11
9
 
12
10
  var _printString = require('./printString.js');
13
11
 
12
+ var _visitor = require('./visitor.js');
13
+
14
14
  /**
15
15
  * Converts an AST into a string, using one set of reasonable
16
16
  * formatting rules.
@@ -1,6 +1,6 @@
1
- import { visit } from './visitor.mjs';
2
1
  import { printBlockString } from './blockString.mjs';
3
2
  import { printString } from './printString.mjs';
3
+ import { visit } from './visitor.mjs';
4
4
  /**
5
5
  * Converts an AST into a string, using one set of reasonable
6
6
  * formatting rules.
@@ -6,10 +6,10 @@ Object.defineProperty(exports, '__esModule', {
6
6
  exports.Source = void 0;
7
7
  exports.isSource = isSource;
8
8
 
9
- var _inspect = require('../jsutils/inspect.js');
10
-
11
9
  var _devAssert = require('../jsutils/devAssert.js');
12
10
 
11
+ var _inspect = require('../jsutils/inspect.js');
12
+
13
13
  var _instanceOf = require('../jsutils/instanceOf.js');
14
14
 
15
15
  /**
@@ -1,5 +1,5 @@
1
- import { inspect } from '../jsutils/inspect.mjs';
2
1
  import { devAssert } from '../jsutils/devAssert.mjs';
2
+ import { inspect } from '../jsutils/inspect.mjs';
3
3
  import { instanceOf } from '../jsutils/instanceOf.mjs';
4
4
 
5
5
  /**
@@ -9,10 +9,10 @@ exports.getVisitFn = getVisitFn;
9
9
  exports.visit = visit;
10
10
  exports.visitInParallel = visitInParallel;
11
11
 
12
- var _inspect = require('../jsutils/inspect.js');
13
-
14
12
  var _devAssert = require('../jsutils/devAssert.js');
15
13
 
14
+ var _inspect = require('../jsutils/inspect.js');
15
+
16
16
  var _ast = require('./ast.js');
17
17
 
18
18
  var _kinds = require('./kinds.js');
@@ -112,12 +112,11 @@ function visit(root, visitor, visitorKeys = _ast.QueryDocumentKeys) {
112
112
  let keys = [root];
113
113
  let index = -1;
114
114
  let edits = [];
115
- let node = undefined;
115
+ let node = root;
116
116
  let key = undefined;
117
117
  let parent = undefined;
118
118
  const path = [];
119
119
  const ancestors = [];
120
- let newRoot = root;
121
120
  /* eslint-enable no-undef-init */
122
121
 
123
122
  do {
@@ -162,17 +161,15 @@ function visit(root, visitor, visitorKeys = _ast.QueryDocumentKeys) {
162
161
  edits = stack.edits;
163
162
  inArray = stack.inArray;
164
163
  stack = stack.prev;
165
- } else {
166
- key = parent ? (inArray ? index : keys[index]) : undefined;
167
- node = parent ? parent[key] : newRoot;
164
+ } else if (parent) {
165
+ key = inArray ? index : keys[index];
166
+ node = parent[key];
168
167
 
169
168
  if (node === null || node === undefined) {
170
169
  continue;
171
170
  }
172
171
 
173
- if (parent) {
174
- path.push(key);
175
- }
172
+ path.push(key);
176
173
  }
177
174
 
178
175
  let result;
@@ -257,10 +254,11 @@ function visit(root, visitor, visitorKeys = _ast.QueryDocumentKeys) {
257
254
  } while (stack !== undefined);
258
255
 
259
256
  if (edits.length !== 0) {
260
- newRoot = edits[edits.length - 1][1];
257
+ // New root
258
+ return edits[edits.length - 1][1];
261
259
  }
262
260
 
263
- return newRoot;
261
+ return root;
264
262
  }
265
263
  /**
266
264
  * Creates a new visitor instance which delegates to many visitors to run in
@@ -1,5 +1,5 @@
1
- import { inspect } from '../jsutils/inspect.mjs';
2
1
  import { devAssert } from '../jsutils/devAssert.mjs';
2
+ import { inspect } from '../jsutils/inspect.mjs';
3
3
  import { isNode, QueryDocumentKeys } from './ast.mjs';
4
4
  import { Kind } from './kinds.mjs';
5
5
  /**
@@ -100,12 +100,11 @@ export function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
100
100
  let keys = [root];
101
101
  let index = -1;
102
102
  let edits = [];
103
- let node = undefined;
103
+ let node = root;
104
104
  let key = undefined;
105
105
  let parent = undefined;
106
106
  const path = [];
107
107
  const ancestors = [];
108
- let newRoot = root;
109
108
  /* eslint-enable no-undef-init */
110
109
 
111
110
  do {
@@ -150,17 +149,15 @@ export function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
150
149
  edits = stack.edits;
151
150
  inArray = stack.inArray;
152
151
  stack = stack.prev;
153
- } else {
154
- key = parent ? (inArray ? index : keys[index]) : undefined;
155
- node = parent ? parent[key] : newRoot;
152
+ } else if (parent) {
153
+ key = inArray ? index : keys[index];
154
+ node = parent[key];
156
155
 
157
156
  if (node === null || node === undefined) {
158
157
  continue;
159
158
  }
160
159
 
161
- if (parent) {
162
- path.push(key);
163
- }
160
+ path.push(key);
164
161
  }
165
162
 
166
163
  let result;
@@ -241,10 +238,11 @@ export function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
241
238
  } while (stack !== undefined);
242
239
 
243
240
  if (edits.length !== 0) {
244
- newRoot = edits[edits.length - 1][1];
241
+ // New root
242
+ return edits[edits.length - 1][1];
245
243
  }
246
244
 
247
- return newRoot;
245
+ return root;
248
246
  }
249
247
  /**
250
248
  * Creates a new visitor instance which delegates to many visitors to run in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql",
3
- "version": "16.2.0",
3
+ "version": "16.3.0",
4
4
  "description": "A Query Language and Runtime which can target any service.",
5
5
  "license": "MIT",
6
6
  "main": "index",
@@ -1,6 +1,6 @@
1
1
  import { devAssert } from '../jsutils/devAssert.mjs';
2
2
  import { GraphQLError } from '../error/GraphQLError.mjs';
3
- import { isNameStart, isNameContinue } from '../language/characterClasses.mjs';
3
+ import { isNameContinue, isNameStart } from '../language/characterClasses.mjs';
4
4
  /**
5
5
  * Upholds the spec rules about naming.
6
6
  */
@@ -1,27 +1,27 @@
1
+ import type { Maybe } from '../jsutils/Maybe';
2
+ import type { ObjMap } from '../jsutils/ObjMap';
1
3
  import type { Path } from '../jsutils/Path';
2
4
  import type { PromiseOrValue } from '../jsutils/PromiseOrValue';
3
- import type { ObjMap } from '../jsutils/ObjMap';
4
- import type { Maybe } from '../jsutils/Maybe';
5
5
  import type {
6
+ EnumTypeDefinitionNode,
7
+ EnumTypeExtensionNode,
8
+ EnumValueDefinitionNode,
9
+ FieldDefinitionNode,
6
10
  FieldNode,
7
- ValueNode,
8
- OperationDefinitionNode,
9
11
  FragmentDefinitionNode,
10
- ScalarTypeDefinitionNode,
11
- ScalarTypeExtensionNode,
12
- ObjectTypeDefinitionNode,
13
- ObjectTypeExtensionNode,
14
- FieldDefinitionNode,
12
+ InputObjectTypeDefinitionNode,
13
+ InputObjectTypeExtensionNode,
15
14
  InputValueDefinitionNode,
16
15
  InterfaceTypeDefinitionNode,
17
16
  InterfaceTypeExtensionNode,
17
+ ObjectTypeDefinitionNode,
18
+ ObjectTypeExtensionNode,
19
+ OperationDefinitionNode,
20
+ ScalarTypeDefinitionNode,
21
+ ScalarTypeExtensionNode,
18
22
  UnionTypeDefinitionNode,
19
23
  UnionTypeExtensionNode,
20
- EnumTypeDefinitionNode,
21
- EnumValueDefinitionNode,
22
- EnumTypeExtensionNode,
23
- InputObjectTypeDefinitionNode,
24
- InputObjectTypeExtensionNode,
24
+ ValueNode,
25
25
  } from '../language/ast';
26
26
  import type { GraphQLSchema } from './schema';
27
27
  /**
@@ -55,28 +55,28 @@ exports.isWrappingType = isWrappingType;
55
55
  exports.resolveObjMapThunk = resolveObjMapThunk;
56
56
  exports.resolveReadonlyArrayThunk = resolveReadonlyArrayThunk;
57
57
 
58
- var _inspect = require('../jsutils/inspect.js');
59
-
60
- var _keyMap = require('../jsutils/keyMap.js');
61
-
62
- var _mapValue = require('../jsutils/mapValue.js');
58
+ var _devAssert = require('../jsutils/devAssert.js');
63
59
 
64
- var _toObjMap = require('../jsutils/toObjMap.js');
60
+ var _didYouMean = require('../jsutils/didYouMean.js');
65
61
 
66
- var _devAssert = require('../jsutils/devAssert.js');
62
+ var _identityFunc = require('../jsutils/identityFunc.js');
67
63
 
68
- var _keyValMap = require('../jsutils/keyValMap.js');
64
+ var _inspect = require('../jsutils/inspect.js');
69
65
 
70
66
  var _instanceOf = require('../jsutils/instanceOf.js');
71
67
 
72
- var _didYouMean = require('../jsutils/didYouMean.js');
73
-
74
68
  var _isObjectLike = require('../jsutils/isObjectLike.js');
75
69
 
76
- var _identityFunc = require('../jsutils/identityFunc.js');
70
+ var _keyMap = require('../jsutils/keyMap.js');
71
+
72
+ var _keyValMap = require('../jsutils/keyValMap.js');
73
+
74
+ var _mapValue = require('../jsutils/mapValue.js');
77
75
 
78
76
  var _suggestionList = require('../jsutils/suggestionList.js');
79
77
 
78
+ var _toObjMap = require('../jsutils/toObjMap.js');
79
+
80
80
  var _GraphQLError = require('../error/GraphQLError.js');
81
81
 
82
82
  var _kinds = require('../language/kinds.js');
@@ -1,24 +1,19 @@
1
- import { inspect } from '../jsutils/inspect.mjs';
2
- import { keyMap } from '../jsutils/keyMap.mjs';
3
- import { mapValue } from '../jsutils/mapValue.mjs';
4
- import { toObjMap } from '../jsutils/toObjMap.mjs';
5
1
  import { devAssert } from '../jsutils/devAssert.mjs';
6
- import { keyValMap } from '../jsutils/keyValMap.mjs';
7
- import { instanceOf } from '../jsutils/instanceOf.mjs';
8
2
  import { didYouMean } from '../jsutils/didYouMean.mjs';
9
- import { isObjectLike } from '../jsutils/isObjectLike.mjs';
10
3
  import { identityFunc } from '../jsutils/identityFunc.mjs';
4
+ import { inspect } from '../jsutils/inspect.mjs';
5
+ import { instanceOf } from '../jsutils/instanceOf.mjs';
6
+ import { isObjectLike } from '../jsutils/isObjectLike.mjs';
7
+ import { keyMap } from '../jsutils/keyMap.mjs';
8
+ import { keyValMap } from '../jsutils/keyValMap.mjs';
9
+ import { mapValue } from '../jsutils/mapValue.mjs';
11
10
  import { suggestionList } from '../jsutils/suggestionList.mjs';
11
+ import { toObjMap } from '../jsutils/toObjMap.mjs';
12
12
  import { GraphQLError } from '../error/GraphQLError.mjs';
13
13
  import { Kind } from '../language/kinds.mjs';
14
14
  import { print } from '../language/printer.mjs';
15
15
  import { valueFromASTUntyped } from '../utilities/valueFromASTUntyped.mjs';
16
- import { assertName, assertEnumValueName } from './assertName.mjs'; // Predicates & Assertions
17
-
18
- /**
19
- * These are all of the possible kinds of types.
20
- */
21
-
16
+ import { assertEnumValueName, assertName } from './assertName.mjs';
22
17
  export function isType(type) {
23
18
  return (
24
19
  isScalarType(type) ||
@@ -15,24 +15,24 @@ exports.isDirective = isDirective;
15
15
  exports.isSpecifiedDirective = isSpecifiedDirective;
16
16
  exports.specifiedDirectives = void 0;
17
17
 
18
- var _inspect = require('../jsutils/inspect.js');
19
-
20
- var _toObjMap = require('../jsutils/toObjMap.js');
21
-
22
18
  var _devAssert = require('../jsutils/devAssert.js');
23
19
 
20
+ var _inspect = require('../jsutils/inspect.js');
21
+
24
22
  var _instanceOf = require('../jsutils/instanceOf.js');
25
23
 
26
24
  var _isObjectLike = require('../jsutils/isObjectLike.js');
27
25
 
26
+ var _toObjMap = require('../jsutils/toObjMap.js');
27
+
28
28
  var _directiveLocation = require('../language/directiveLocation.js');
29
29
 
30
30
  var _assertName = require('./assertName.js');
31
31
 
32
- var _scalars = require('./scalars.js');
33
-
34
32
  var _definition = require('./definition.js');
35
33
 
34
+ var _scalars = require('./scalars.js');
35
+
36
36
  /**
37
37
  * Test if the given value is a GraphQL directive.
38
38
  */
@@ -1,16 +1,16 @@
1
- import { inspect } from '../jsutils/inspect.mjs';
2
- import { toObjMap } from '../jsutils/toObjMap.mjs';
3
1
  import { devAssert } from '../jsutils/devAssert.mjs';
2
+ import { inspect } from '../jsutils/inspect.mjs';
4
3
  import { instanceOf } from '../jsutils/instanceOf.mjs';
5
4
  import { isObjectLike } from '../jsutils/isObjectLike.mjs';
5
+ import { toObjMap } from '../jsutils/toObjMap.mjs';
6
6
  import { DirectiveLocation } from '../language/directiveLocation.mjs';
7
7
  import { assertName } from './assertName.mjs';
8
- import { GraphQLString, GraphQLBoolean } from './scalars.mjs';
9
8
  import {
10
- defineArguments,
11
9
  argsToArgsConfig,
10
+ defineArguments,
12
11
  GraphQLNonNull,
13
12
  } from './definition.mjs';
13
+ import { GraphQLBoolean, GraphQLString } from './scalars.mjs';
14
14
  /**
15
15
  * Test if the given value is a GraphQL directive.
16
16
  */
package/type/index.d.ts CHANGED
@@ -1,17 +1,9 @@
1
1
  export type { Path as ResponsePath } from '../jsutils/Path';
2
- export {
3
- /** Predicate */
4
- isSchema,
5
- /** Assertion */
6
- assertSchema,
7
- /** GraphQL Schema definition */
8
- GraphQLSchema,
9
- } from './schema';
2
+ export { isSchema, assertSchema, GraphQLSchema } from './schema';
10
3
  export type { GraphQLSchemaConfig, GraphQLSchemaExtensions } from './schema';
11
4
  export {
12
5
  resolveObjMapThunk,
13
6
  resolveReadonlyArrayThunk,
14
- /** Predicates */
15
7
  isType,
16
8
  isScalarType,
17
9
  isObjectType,
@@ -31,7 +23,6 @@ export {
31
23
  isNamedType,
32
24
  isRequiredArgument,
33
25
  isRequiredInputField,
34
- /** Assertions */
35
26
  assertType,
36
27
  assertScalarType,
37
28
  assertObjectType,
@@ -49,17 +40,14 @@ export {
49
40
  assertWrappingType,
50
41
  assertNullableType,
51
42
  assertNamedType,
52
- /** Un-modifiers */
53
43
  getNullableType,
54
44
  getNamedType,
55
- /** Definitions */
56
45
  GraphQLScalarType,
57
46
  GraphQLObjectType,
58
47
  GraphQLInterfaceType,
59
48
  GraphQLUnionType,
60
49
  GraphQLEnumType,
61
50
  GraphQLInputObjectType,
62
- /** Type Wrappers */
63
51
  GraphQLList,
64
52
  GraphQLNonNull,
65
53
  } from './definition';
@@ -116,45 +104,34 @@ export type {
116
104
  GraphQLScalarLiteralParser,
117
105
  } from './definition';
118
106
  export {
119
- /** Predicate */
120
107
  isDirective,
121
- /** Assertion */
122
108
  assertDirective,
123
- /** Directives Definition */
124
109
  GraphQLDirective,
125
- /** Built-in Directives defined by the Spec */
126
110
  isSpecifiedDirective,
127
111
  specifiedDirectives,
128
112
  GraphQLIncludeDirective,
129
113
  GraphQLSkipDirective,
130
114
  GraphQLDeprecatedDirective,
131
115
  GraphQLSpecifiedByDirective,
132
- /** Constant Deprecation Reason */
133
116
  DEFAULT_DEPRECATION_REASON,
134
117
  } from './directives';
135
118
  export type {
136
119
  GraphQLDirectiveConfig,
137
120
  GraphQLDirectiveExtensions,
138
121
  } from './directives';
139
- /** Common built-in scalar instances. */
140
122
  export {
141
- /** Predicate */
142
123
  isSpecifiedScalarType,
143
- /** Standard GraphQL Scalars */
144
124
  specifiedScalarTypes,
145
125
  GraphQLInt,
146
126
  GraphQLFloat,
147
127
  GraphQLString,
148
128
  GraphQLBoolean,
149
129
  GraphQLID,
150
- /** Int boundaries constants */
151
130
  GRAPHQL_MAX_INT,
152
131
  GRAPHQL_MIN_INT,
153
132
  } from './scalars';
154
133
  export {
155
- /** Predicate */
156
134
  isIntrospectionType,
157
- /** GraphQL Types for introspection. */
158
135
  introspectionTypes,
159
136
  __Schema,
160
137
  __Directive,
@@ -164,14 +141,10 @@ export {
164
141
  __InputValue,
165
142
  __EnumValue,
166
143
  __TypeKind,
167
- /** "Enum" of Type Kinds */
168
144
  TypeKind,
169
- /** Meta-field definitions. */
170
145
  SchemaMetaFieldDef,
171
146
  TypeMetaFieldDef,
172
147
  TypeNameMetaFieldDef,
173
148
  } from './introspection';
174
- /** Validate GraphQL schema. */
175
149
  export { validateSchema, assertValidSchema } from './validate';
176
- /** Upholds the spec rules about naming. */
177
150
  export { assertName, assertEnumValueName } from './assertName';