graphql 14.1.1 → 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 (377) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/error/GraphQLError.js +12 -10
  4. package/error/GraphQLError.js.flow +11 -6
  5. package/error/GraphQLError.mjs +20 -3
  6. package/error/formatError.js +2 -2
  7. package/error/formatError.js.flow +3 -3
  8. package/error/formatError.mjs +2 -2
  9. package/error/index.js +1 -1
  10. package/error/index.js.flow +5 -2
  11. package/error/index.mjs +2 -2
  12. package/error/locatedError.js +2 -2
  13. package/error/locatedError.js.flow +2 -2
  14. package/error/locatedError.mjs +2 -2
  15. package/error/printError.js +2 -2
  16. package/error/printError.js.flow +4 -5
  17. package/error/printError.mjs +2 -2
  18. package/error/syntaxError.js +2 -2
  19. package/error/syntaxError.js.flow +2 -2
  20. package/error/syntaxError.mjs +2 -2
  21. package/execution/execute.js +52 -37
  22. package/execution/execute.js.flow +66 -51
  23. package/execution/execute.mjs +50 -38
  24. package/execution/index.js +7 -1
  25. package/execution/index.js.flow +9 -4
  26. package/execution/index.mjs +3 -3
  27. package/execution/values.js +11 -11
  28. package/execution/values.js.flow +23 -19
  29. package/execution/values.mjs +11 -11
  30. package/graphql.js +13 -9
  31. package/graphql.js.flow +28 -10
  32. package/graphql.mjs +10 -9
  33. package/index.js +83 -53
  34. package/index.js.flow +60 -47
  35. package/index.mjs +26 -23
  36. package/jsutils/ObjMap.js +1 -1
  37. package/jsutils/ObjMap.js.flow +1 -1
  38. package/jsutils/ObjMap.mjs +1 -0
  39. package/jsutils/PromiseOrValue.js +1 -0
  40. package/jsutils/{MaybePromise.js.flow → PromiseOrValue.js.flow} +2 -2
  41. package/jsutils/PromiseOrValue.mjs +1 -0
  42. package/jsutils/dedent.js +2 -2
  43. package/jsutils/dedent.js.flow +1 -1
  44. package/jsutils/dedent.mjs +2 -2
  45. package/jsutils/defineToJSON.js +2 -2
  46. package/jsutils/defineToJSON.js.flow +1 -1
  47. package/jsutils/defineToJSON.mjs +2 -2
  48. package/jsutils/defineToStringTag.js +2 -2
  49. package/jsutils/defineToStringTag.js.flow +1 -1
  50. package/jsutils/defineToStringTag.mjs +2 -2
  51. package/jsutils/inspect.js +94 -19
  52. package/jsutils/inspect.js.flow +98 -20
  53. package/jsutils/inspect.mjs +94 -20
  54. package/jsutils/instanceOf.js +2 -2
  55. package/jsutils/instanceOf.js.flow +1 -1
  56. package/jsutils/instanceOf.mjs +2 -2
  57. package/jsutils/invariant.js +5 -3
  58. package/jsutils/invariant.js.flow +3 -2
  59. package/jsutils/invariant.mjs +5 -3
  60. package/jsutils/isInvalid.js +2 -2
  61. package/jsutils/isInvalid.js.flow +1 -1
  62. package/jsutils/isInvalid.mjs +2 -2
  63. package/jsutils/isNullish.js +2 -2
  64. package/jsutils/isNullish.js.flow +1 -1
  65. package/jsutils/isNullish.mjs +2 -2
  66. package/jsutils/isPromise.js +2 -2
  67. package/jsutils/isPromise.js.flow +1 -1
  68. package/jsutils/isPromise.mjs +2 -2
  69. package/jsutils/keyMap.js +4 -3
  70. package/jsutils/keyMap.js.flow +6 -6
  71. package/jsutils/keyMap.mjs +4 -3
  72. package/jsutils/keyValMap.js +4 -3
  73. package/jsutils/keyValMap.js.flow +6 -6
  74. package/jsutils/keyValMap.mjs +4 -3
  75. package/jsutils/mapValue.js +2 -2
  76. package/jsutils/mapValue.js.flow +2 -2
  77. package/jsutils/mapValue.mjs +2 -2
  78. package/jsutils/memoize3.js +3 -3
  79. package/jsutils/memoize3.js.flow +2 -2
  80. package/jsutils/memoize3.mjs +3 -3
  81. package/jsutils/nodejsCustomInspectSymbol.js +2 -2
  82. package/jsutils/nodejsCustomInspectSymbol.js.flow +1 -1
  83. package/jsutils/nodejsCustomInspectSymbol.mjs +2 -2
  84. package/jsutils/orList.js +2 -2
  85. package/jsutils/orList.js.flow +1 -1
  86. package/jsutils/orList.mjs +2 -2
  87. package/jsutils/promiseForObject.js +2 -2
  88. package/jsutils/promiseForObject.js.flow +2 -2
  89. package/jsutils/promiseForObject.mjs +2 -2
  90. package/jsutils/promiseReduce.js +2 -2
  91. package/jsutils/promiseReduce.js.flow +5 -5
  92. package/jsutils/promiseReduce.mjs +2 -2
  93. package/jsutils/quotedOrList.js +2 -2
  94. package/jsutils/quotedOrList.js.flow +1 -1
  95. package/jsutils/quotedOrList.mjs +2 -2
  96. package/jsutils/suggestionList.js +2 -2
  97. package/jsutils/suggestionList.js.flow +1 -1
  98. package/jsutils/suggestionList.mjs +2 -2
  99. package/language/ast.js +1 -1
  100. package/language/ast.js.flow +3 -3
  101. package/language/ast.mjs +1 -0
  102. package/language/blockString.js +114 -0
  103. package/language/blockString.js.flow +102 -0
  104. package/language/blockString.mjs +104 -0
  105. package/language/directiveLocation.js +2 -2
  106. package/language/directiveLocation.js.flow +1 -1
  107. package/language/directiveLocation.mjs +2 -2
  108. package/language/index.js +9 -9
  109. package/language/index.js.flow +10 -5
  110. package/language/index.mjs +3 -3
  111. package/language/kinds.js +2 -2
  112. package/language/kinds.js.flow +1 -1
  113. package/language/kinds.mjs +2 -2
  114. package/language/lexer.js +52 -44
  115. package/language/lexer.js.flow +65 -54
  116. package/language/lexer.mjs +49 -43
  117. package/language/location.js +2 -2
  118. package/language/location.js.flow +2 -2
  119. package/language/location.mjs +2 -2
  120. package/language/parser.js +75 -67
  121. package/language/parser.js.flow +138 -127
  122. package/language/parser.mjs +76 -68
  123. package/language/predicates.js +2 -2
  124. package/language/predicates.js.flow +2 -2
  125. package/language/predicates.mjs +2 -2
  126. package/language/printer.js +6 -14
  127. package/language/printer.js.flow +8 -17
  128. package/language/printer.mjs +5 -14
  129. package/language/source.js +2 -2
  130. package/language/source.js.flow +1 -1
  131. package/language/source.mjs +2 -2
  132. package/language/visitor.js +4 -6
  133. package/language/visitor.js.flow +3 -3
  134. package/language/visitor.mjs +4 -6
  135. package/package.json +1 -1
  136. package/polyfills/find.js +2 -2
  137. package/polyfills/find.js.flow +1 -1
  138. package/polyfills/find.mjs +2 -2
  139. package/polyfills/flatMap.js +38 -0
  140. package/polyfills/flatMap.js.flow +34 -0
  141. package/polyfills/flatMap.mjs +30 -0
  142. package/polyfills/isFinite.js +2 -2
  143. package/polyfills/isFinite.js.flow +1 -1
  144. package/polyfills/isFinite.mjs +2 -2
  145. package/polyfills/isInteger.js +2 -2
  146. package/polyfills/isInteger.js.flow +1 -1
  147. package/polyfills/isInteger.mjs +2 -2
  148. package/polyfills/objectEntries.js +2 -2
  149. package/polyfills/objectEntries.js.flow +2 -2
  150. package/polyfills/objectEntries.mjs +2 -2
  151. package/polyfills/objectValues.js +2 -2
  152. package/polyfills/objectValues.js.flow +2 -2
  153. package/polyfills/objectValues.mjs +2 -2
  154. package/subscription/asyncIteratorReject.js +1 -1
  155. package/subscription/asyncIteratorReject.js.flow +1 -1
  156. package/subscription/asyncIteratorReject.mjs +2 -2
  157. package/subscription/index.js +1 -1
  158. package/subscription/index.js.flow +1 -1
  159. package/subscription/index.mjs +2 -2
  160. package/subscription/mapAsyncIterator.js +1 -1
  161. package/subscription/mapAsyncIterator.js.flow +5 -5
  162. package/subscription/mapAsyncIterator.mjs +2 -2
  163. package/subscription/subscribe.js +2 -2
  164. package/subscription/subscribe.js.flow +6 -6
  165. package/subscription/subscribe.mjs +2 -2
  166. package/type/definition.js +138 -22
  167. package/type/definition.js.flow +184 -36
  168. package/type/definition.mjs +136 -23
  169. package/type/directives.js +14 -3
  170. package/type/directives.js.flow +24 -11
  171. package/type/directives.mjs +16 -5
  172. package/type/index.js +7 -7
  173. package/type/index.js.flow +8 -4
  174. package/type/index.mjs +10 -6
  175. package/type/introspection.js +14 -9
  176. package/type/introspection.js.flow +12 -18
  177. package/type/introspection.mjs +14 -9
  178. package/type/scalars.js +5 -4
  179. package/type/scalars.js.flow +4 -10
  180. package/type/scalars.mjs +7 -6
  181. package/type/schema.js +55 -3
  182. package/type/schema.js.flow +73 -17
  183. package/type/schema.mjs +56 -4
  184. package/type/validate.js +19 -47
  185. package/type/validate.js.flow +17 -29
  186. package/type/validate.mjs +18 -47
  187. package/utilities/TypeInfo.js +93 -73
  188. package/utilities/TypeInfo.js.flow +30 -23
  189. package/utilities/TypeInfo.mjs +93 -73
  190. package/utilities/assertValidName.js +2 -2
  191. package/utilities/assertValidName.js.flow +2 -2
  192. package/utilities/assertValidName.mjs +2 -2
  193. package/utilities/astFromValue.js +5 -4
  194. package/utilities/astFromValue.js.flow +8 -7
  195. package/utilities/astFromValue.mjs +7 -6
  196. package/utilities/buildASTSchema.js +63 -62
  197. package/utilities/buildASTSchema.js.flow +92 -108
  198. package/utilities/buildASTSchema.mjs +61 -62
  199. package/utilities/buildClientSchema.js +38 -45
  200. package/utilities/buildClientSchema.js.flow +66 -79
  201. package/utilities/buildClientSchema.mjs +37 -44
  202. package/utilities/coerceValue.js +6 -7
  203. package/utilities/coerceValue.js.flow +5 -4
  204. package/utilities/coerceValue.mjs +7 -8
  205. package/utilities/concatAST.js +9 -13
  206. package/utilities/concatAST.js.flow +4 -10
  207. package/utilities/concatAST.mjs +6 -13
  208. package/utilities/extendSchema.js +219 -511
  209. package/utilities/extendSchema.js.flow +195 -304
  210. package/utilities/extendSchema.mjs +218 -512
  211. package/utilities/findBreakingChanges.js +54 -95
  212. package/utilities/findBreakingChanges.js.flow +49 -47
  213. package/utilities/findBreakingChanges.mjs +80 -95
  214. package/utilities/findDeprecatedUsages.js +4 -4
  215. package/utilities/findDeprecatedUsages.js.flow +5 -5
  216. package/utilities/findDeprecatedUsages.mjs +4 -4
  217. package/utilities/getOperationAST.js +2 -2
  218. package/utilities/getOperationAST.js.flow +5 -2
  219. package/utilities/getOperationAST.mjs +2 -2
  220. package/utilities/getOperationRootType.js +24 -24
  221. package/utilities/getOperationRootType.js.flow +40 -35
  222. package/utilities/getOperationRootType.mjs +24 -24
  223. package/utilities/index.js +9 -1
  224. package/utilities/index.js.flow +13 -6
  225. package/utilities/index.mjs +13 -8
  226. package/utilities/introspectionFromSchema.js +6 -4
  227. package/utilities/introspectionFromSchema.js.flow +8 -7
  228. package/utilities/introspectionFromSchema.mjs +6 -5
  229. package/utilities/introspectionQuery.js +2 -2
  230. package/utilities/introspectionQuery.js.flow +2 -2
  231. package/utilities/introspectionQuery.mjs +2 -2
  232. package/utilities/isValidJSValue.js +4 -2
  233. package/utilities/isValidJSValue.js.flow +3 -2
  234. package/utilities/isValidJSValue.mjs +4 -2
  235. package/utilities/isValidLiteralValue.js +2 -2
  236. package/utilities/isValidLiteralValue.js.flow +4 -4
  237. package/utilities/isValidLiteralValue.mjs +2 -2
  238. package/utilities/lexicographicSortSchema.js +84 -123
  239. package/utilities/lexicographicSortSchema.js.flow +68 -96
  240. package/utilities/lexicographicSortSchema.mjs +84 -123
  241. package/utilities/schemaPrinter.js +47 -73
  242. package/utilities/schemaPrinter.js.flow +69 -120
  243. package/utilities/schemaPrinter.mjs +45 -72
  244. package/utilities/separateOperations.js +8 -12
  245. package/utilities/separateOperations.js.flow +6 -3
  246. package/utilities/separateOperations.mjs +8 -12
  247. package/utilities/stripIgnoredCharacters.js +140 -0
  248. package/utilities/stripIgnoredCharacters.js.flow +129 -0
  249. package/utilities/stripIgnoredCharacters.mjs +127 -0
  250. package/utilities/typeComparators.js +2 -2
  251. package/utilities/typeComparators.js.flow +4 -3
  252. package/utilities/typeComparators.mjs +2 -2
  253. package/utilities/typeFromAST.js +9 -4
  254. package/utilities/typeFromAST.js.flow +15 -9
  255. package/utilities/typeFromAST.mjs +6 -4
  256. package/utilities/valueFromAST.js +7 -4
  257. package/utilities/valueFromAST.js.flow +7 -5
  258. package/utilities/valueFromAST.mjs +6 -4
  259. package/utilities/valueFromASTUntyped.js +11 -6
  260. package/utilities/valueFromASTUntyped.js.flow +9 -5
  261. package/utilities/valueFromASTUntyped.mjs +10 -6
  262. package/validation/ValidationContext.js +1 -1
  263. package/validation/ValidationContext.js.flow +19 -20
  264. package/validation/ValidationContext.mjs +2 -2
  265. package/validation/index.js +1 -1
  266. package/validation/index.js.flow +2 -1
  267. package/validation/index.mjs +3 -2
  268. package/validation/rules/ExecutableDefinitions.js +3 -3
  269. package/validation/rules/ExecutableDefinitions.js.flow +4 -4
  270. package/validation/rules/ExecutableDefinitions.mjs +3 -3
  271. package/validation/rules/FieldsOnCorrectType.js +3 -3
  272. package/validation/rules/FieldsOnCorrectType.js.flow +7 -7
  273. package/validation/rules/FieldsOnCorrectType.mjs +3 -3
  274. package/validation/rules/FragmentsOnCompositeTypes.js +4 -4
  275. package/validation/rules/FragmentsOnCompositeTypes.js.flow +5 -5
  276. package/validation/rules/FragmentsOnCompositeTypes.mjs +4 -4
  277. package/validation/rules/KnownArgumentNames.js +1 -1
  278. package/validation/rules/KnownArgumentNames.js.flow +5 -5
  279. package/validation/rules/KnownArgumentNames.mjs +2 -2
  280. package/validation/rules/KnownDirectives.js +8 -6
  281. package/validation/rules/KnownDirectives.js.flow +11 -9
  282. package/validation/rules/KnownDirectives.mjs +8 -6
  283. package/validation/rules/KnownFragmentNames.js +3 -3
  284. package/validation/rules/KnownFragmentNames.js.flow +4 -4
  285. package/validation/rules/KnownFragmentNames.mjs +3 -3
  286. package/validation/rules/KnownTypeNames.js +2 -2
  287. package/validation/rules/KnownTypeNames.js.flow +6 -6
  288. package/validation/rules/KnownTypeNames.mjs +2 -2
  289. package/validation/rules/LoneAnonymousOperation.js +3 -3
  290. package/validation/rules/LoneAnonymousOperation.js.flow +4 -4
  291. package/validation/rules/LoneAnonymousOperation.mjs +3 -3
  292. package/validation/rules/LoneSchemaDefinition.js +2 -2
  293. package/validation/rules/LoneSchemaDefinition.js.flow +3 -3
  294. package/validation/rules/LoneSchemaDefinition.mjs +2 -2
  295. package/validation/rules/NoFragmentCycles.js +2 -2
  296. package/validation/rules/NoFragmentCycles.js.flow +4 -4
  297. package/validation/rules/NoFragmentCycles.mjs +2 -2
  298. package/validation/rules/NoUndefinedVariables.js +2 -2
  299. package/validation/rules/NoUndefinedVariables.js.flow +3 -3
  300. package/validation/rules/NoUndefinedVariables.mjs +2 -2
  301. package/validation/rules/NoUnusedFragments.js +7 -7
  302. package/validation/rules/NoUnusedFragments.js.flow +4 -4
  303. package/validation/rules/NoUnusedFragments.mjs +7 -7
  304. package/validation/rules/NoUnusedVariables.js +5 -5
  305. package/validation/rules/NoUnusedVariables.js.flow +6 -5
  306. package/validation/rules/NoUnusedVariables.mjs +5 -5
  307. package/validation/rules/OverlappingFieldsCanBeMerged.js +26 -23
  308. package/validation/rules/OverlappingFieldsCanBeMerged.js.flow +17 -17
  309. package/validation/rules/OverlappingFieldsCanBeMerged.mjs +26 -23
  310. package/validation/rules/PossibleFragmentSpreads.js +4 -4
  311. package/validation/rules/PossibleFragmentSpreads.js.flow +5 -5
  312. package/validation/rules/PossibleFragmentSpreads.mjs +4 -4
  313. package/validation/rules/PossibleTypeExtensions.js +3 -3
  314. package/validation/rules/PossibleTypeExtensions.js.flow +5 -5
  315. package/validation/rules/PossibleTypeExtensions.mjs +4 -4
  316. package/validation/rules/ProvidedRequiredArguments.js +6 -8
  317. package/validation/rules/ProvidedRequiredArguments.js.flow +8 -8
  318. package/validation/rules/ProvidedRequiredArguments.mjs +7 -9
  319. package/validation/rules/ScalarLeafs.js +4 -4
  320. package/validation/rules/ScalarLeafs.js.flow +6 -6
  321. package/validation/rules/ScalarLeafs.mjs +4 -4
  322. package/validation/rules/SingleFieldSubscriptions.js +2 -2
  323. package/validation/rules/SingleFieldSubscriptions.js.flow +4 -4
  324. package/validation/rules/SingleFieldSubscriptions.mjs +2 -2
  325. package/validation/rules/UniqueArgumentNames.js +2 -2
  326. package/validation/rules/UniqueArgumentNames.js.flow +3 -3
  327. package/validation/rules/UniqueArgumentNames.mjs +2 -2
  328. package/validation/rules/UniqueDirectiveNames.js +2 -2
  329. package/validation/rules/UniqueDirectiveNames.js.flow +3 -3
  330. package/validation/rules/UniqueDirectiveNames.mjs +2 -2
  331. package/validation/rules/UniqueDirectivesPerLocation.js +3 -2
  332. package/validation/rules/UniqueDirectivesPerLocation.js.flow +4 -4
  333. package/validation/rules/UniqueDirectivesPerLocation.mjs +3 -2
  334. package/validation/rules/UniqueEnumValueNames.js +4 -8
  335. package/validation/rules/UniqueEnumValueNames.js.flow +6 -8
  336. package/validation/rules/UniqueEnumValueNames.mjs +4 -8
  337. package/validation/rules/UniqueFieldDefinitionNames.js +4 -8
  338. package/validation/rules/UniqueFieldDefinitionNames.js.flow +6 -8
  339. package/validation/rules/UniqueFieldDefinitionNames.mjs +4 -8
  340. package/validation/rules/UniqueFragmentNames.js +2 -2
  341. package/validation/rules/UniqueFragmentNames.js.flow +3 -3
  342. package/validation/rules/UniqueFragmentNames.mjs +2 -2
  343. package/validation/rules/UniqueInputFieldNames.js +2 -4
  344. package/validation/rules/UniqueInputFieldNames.js.flow +3 -4
  345. package/validation/rules/UniqueInputFieldNames.mjs +2 -4
  346. package/validation/rules/UniqueOperationNames.js +2 -2
  347. package/validation/rules/UniqueOperationNames.js.flow +3 -3
  348. package/validation/rules/UniqueOperationNames.mjs +2 -2
  349. package/validation/rules/UniqueOperationTypes.js +2 -2
  350. package/validation/rules/UniqueOperationTypes.js.flow +3 -3
  351. package/validation/rules/UniqueOperationTypes.mjs +2 -2
  352. package/validation/rules/UniqueTypeNames.js +2 -2
  353. package/validation/rules/UniqueTypeNames.js.flow +4 -4
  354. package/validation/rules/UniqueTypeNames.mjs +2 -2
  355. package/validation/rules/UniqueVariableNames.js +2 -2
  356. package/validation/rules/UniqueVariableNames.js.flow +4 -4
  357. package/validation/rules/UniqueVariableNames.mjs +2 -2
  358. package/validation/rules/ValuesOfCorrectType.js +2 -2
  359. package/validation/rules/ValuesOfCorrectType.js.flow +5 -5
  360. package/validation/rules/ValuesOfCorrectType.mjs +2 -2
  361. package/validation/rules/VariablesAreInputTypes.js +3 -3
  362. package/validation/rules/VariablesAreInputTypes.js.flow +5 -5
  363. package/validation/rules/VariablesAreInputTypes.mjs +3 -3
  364. package/validation/rules/VariablesInAllowedPosition.js +3 -3
  365. package/validation/rules/VariablesInAllowedPosition.js.flow +7 -8
  366. package/validation/rules/VariablesInAllowedPosition.mjs +3 -3
  367. package/validation/specifiedRules.js +2 -2
  368. package/validation/specifiedRules.js.flow +13 -6
  369. package/validation/specifiedRules.mjs +7 -7
  370. package/validation/validate.js +2 -2
  371. package/validation/validate.js.flow +10 -6
  372. package/validation/validate.mjs +2 -2
  373. package/jsutils/MaybePromise.js +0 -1
  374. package/jsutils/MaybePromise.mjs +0 -0
  375. package/language/blockStringValue.js +0 -73
  376. package/language/blockStringValue.js.flow +0 -64
  377. package/language/blockStringValue.mjs +0 -66
package/index.js CHANGED
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "GraphQLSchema", {
21
21
  return _type.GraphQLSchema;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "GraphQLDirective", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _type.GraphQLDirective;
28
+ }
29
+ });
24
30
  Object.defineProperty(exports, "GraphQLScalarType", {
25
31
  enumerable: true,
26
32
  get: function get() {
@@ -69,18 +75,6 @@ Object.defineProperty(exports, "GraphQLNonNull", {
69
75
  return _type.GraphQLNonNull;
70
76
  }
71
77
  });
72
- Object.defineProperty(exports, "GraphQLDirective", {
73
- enumerable: true,
74
- get: function get() {
75
- return _type.GraphQLDirective;
76
- }
77
- });
78
- Object.defineProperty(exports, "TypeKind", {
79
- enumerable: true,
80
- get: function get() {
81
- return _type.TypeKind;
82
- }
83
- });
84
78
  Object.defineProperty(exports, "specifiedScalarTypes", {
85
79
  enumerable: true,
86
80
  get: function get() {
@@ -141,28 +135,16 @@ Object.defineProperty(exports, "GraphQLDeprecatedDirective", {
141
135
  return _type.GraphQLDeprecatedDirective;
142
136
  }
143
137
  });
144
- Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", {
145
- enumerable: true,
146
- get: function get() {
147
- return _type.DEFAULT_DEPRECATION_REASON;
148
- }
149
- });
150
- Object.defineProperty(exports, "SchemaMetaFieldDef", {
151
- enumerable: true,
152
- get: function get() {
153
- return _type.SchemaMetaFieldDef;
154
- }
155
- });
156
- Object.defineProperty(exports, "TypeMetaFieldDef", {
138
+ Object.defineProperty(exports, "TypeKind", {
157
139
  enumerable: true,
158
140
  get: function get() {
159
- return _type.TypeMetaFieldDef;
141
+ return _type.TypeKind;
160
142
  }
161
143
  });
162
- Object.defineProperty(exports, "TypeNameMetaFieldDef", {
144
+ Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", {
163
145
  enumerable: true,
164
146
  get: function get() {
165
- return _type.TypeNameMetaFieldDef;
147
+ return _type.DEFAULT_DEPRECATION_REASON;
166
148
  }
167
149
  });
168
150
  Object.defineProperty(exports, "introspectionTypes", {
@@ -219,6 +201,24 @@ Object.defineProperty(exports, "__TypeKind", {
219
201
  return _type.__TypeKind;
220
202
  }
221
203
  });
204
+ Object.defineProperty(exports, "SchemaMetaFieldDef", {
205
+ enumerable: true,
206
+ get: function get() {
207
+ return _type.SchemaMetaFieldDef;
208
+ }
209
+ });
210
+ Object.defineProperty(exports, "TypeMetaFieldDef", {
211
+ enumerable: true,
212
+ get: function get() {
213
+ return _type.TypeMetaFieldDef;
214
+ }
215
+ });
216
+ Object.defineProperty(exports, "TypeNameMetaFieldDef", {
217
+ enumerable: true,
218
+ get: function get() {
219
+ return _type.TypeNameMetaFieldDef;
220
+ }
221
+ });
222
222
  Object.defineProperty(exports, "isSchema", {
223
223
  enumerable: true,
224
224
  get: function get() {
@@ -513,6 +513,18 @@ Object.defineProperty(exports, "getLocation", {
513
513
  return _language.getLocation;
514
514
  }
515
515
  });
516
+ Object.defineProperty(exports, "createLexer", {
517
+ enumerable: true,
518
+ get: function get() {
519
+ return _language.createLexer;
520
+ }
521
+ });
522
+ Object.defineProperty(exports, "TokenKind", {
523
+ enumerable: true,
524
+ get: function get() {
525
+ return _language.TokenKind;
526
+ }
527
+ });
516
528
  Object.defineProperty(exports, "parse", {
517
529
  enumerable: true,
518
530
  get: function get() {
@@ -561,16 +573,16 @@ Object.defineProperty(exports, "getVisitFn", {
561
573
  return _language.getVisitFn;
562
574
  }
563
575
  });
564
- Object.defineProperty(exports, "Kind", {
576
+ Object.defineProperty(exports, "BREAK", {
565
577
  enumerable: true,
566
578
  get: function get() {
567
- return _language.Kind;
579
+ return _language.BREAK;
568
580
  }
569
581
  });
570
- Object.defineProperty(exports, "TokenKind", {
582
+ Object.defineProperty(exports, "Kind", {
571
583
  enumerable: true,
572
584
  get: function get() {
573
- return _language.TokenKind;
585
+ return _language.Kind;
574
586
  }
575
587
  });
576
588
  Object.defineProperty(exports, "DirectiveLocation", {
@@ -579,12 +591,6 @@ Object.defineProperty(exports, "DirectiveLocation", {
579
591
  return _language.DirectiveLocation;
580
592
  }
581
593
  });
582
- Object.defineProperty(exports, "BREAK", {
583
- enumerable: true,
584
- get: function get() {
585
- return _language.BREAK;
586
- }
587
- });
588
594
  Object.defineProperty(exports, "isDefinitionNode", {
589
595
  enumerable: true,
590
596
  get: function get() {
@@ -651,6 +657,12 @@ Object.defineProperty(exports, "defaultFieldResolver", {
651
657
  return _execution.defaultFieldResolver;
652
658
  }
653
659
  });
660
+ Object.defineProperty(exports, "defaultTypeResolver", {
661
+ enumerable: true,
662
+ get: function get() {
663
+ return _execution.defaultTypeResolver;
664
+ }
665
+ });
654
666
  Object.defineProperty(exports, "responsePathAsArray", {
655
667
  enumerable: true,
656
668
  get: function get() {
@@ -849,10 +861,16 @@ Object.defineProperty(exports, "GraphQLError", {
849
861
  return _error.GraphQLError;
850
862
  }
851
863
  });
852
- Object.defineProperty(exports, "formatError", {
864
+ Object.defineProperty(exports, "syntaxError", {
853
865
  enumerable: true,
854
866
  get: function get() {
855
- return _error.formatError;
867
+ return _error.syntaxError;
868
+ }
869
+ });
870
+ Object.defineProperty(exports, "locatedError", {
871
+ enumerable: true,
872
+ get: function get() {
873
+ return _error.locatedError;
856
874
  }
857
875
  });
858
876
  Object.defineProperty(exports, "printError", {
@@ -861,6 +879,12 @@ Object.defineProperty(exports, "printError", {
861
879
  return _error.printError;
862
880
  }
863
881
  });
882
+ Object.defineProperty(exports, "formatError", {
883
+ enumerable: true,
884
+ get: function get() {
885
+ return _error.formatError;
886
+ }
887
+ });
864
888
  Object.defineProperty(exports, "getIntrospectionQuery", {
865
889
  enumerable: true,
866
890
  get: function get() {
@@ -933,16 +957,16 @@ Object.defineProperty(exports, "printSchema", {
933
957
  return _utilities.printSchema;
934
958
  }
935
959
  });
936
- Object.defineProperty(exports, "printIntrospectionSchema", {
960
+ Object.defineProperty(exports, "printType", {
937
961
  enumerable: true,
938
962
  get: function get() {
939
- return _utilities.printIntrospectionSchema;
963
+ return _utilities.printType;
940
964
  }
941
965
  });
942
- Object.defineProperty(exports, "printType", {
966
+ Object.defineProperty(exports, "printIntrospectionSchema", {
943
967
  enumerable: true,
944
968
  get: function get() {
945
- return _utilities.printType;
969
+ return _utilities.printIntrospectionSchema;
946
970
  }
947
971
  });
948
972
  Object.defineProperty(exports, "typeFromAST", {
@@ -1005,6 +1029,12 @@ Object.defineProperty(exports, "separateOperations", {
1005
1029
  return _utilities.separateOperations;
1006
1030
  }
1007
1031
  });
1032
+ Object.defineProperty(exports, "stripIgnoredCharacters", {
1033
+ enumerable: true,
1034
+ get: function get() {
1035
+ return _utilities.stripIgnoredCharacters;
1036
+ }
1037
+ });
1008
1038
  Object.defineProperty(exports, "isEqualType", {
1009
1039
  enumerable: true,
1010
1040
  get: function get() {
@@ -1035,28 +1065,28 @@ Object.defineProperty(exports, "isValidNameError", {
1035
1065
  return _utilities.isValidNameError;
1036
1066
  }
1037
1067
  });
1038
- Object.defineProperty(exports, "findBreakingChanges", {
1068
+ Object.defineProperty(exports, "BreakingChangeType", {
1039
1069
  enumerable: true,
1040
1070
  get: function get() {
1041
- return _utilities.findBreakingChanges;
1071
+ return _utilities.BreakingChangeType;
1042
1072
  }
1043
1073
  });
1044
- Object.defineProperty(exports, "findDangerousChanges", {
1074
+ Object.defineProperty(exports, "DangerousChangeType", {
1045
1075
  enumerable: true,
1046
1076
  get: function get() {
1047
- return _utilities.findDangerousChanges;
1077
+ return _utilities.DangerousChangeType;
1048
1078
  }
1049
1079
  });
1050
- Object.defineProperty(exports, "BreakingChangeType", {
1080
+ Object.defineProperty(exports, "findBreakingChanges", {
1051
1081
  enumerable: true,
1052
1082
  get: function get() {
1053
- return _utilities.BreakingChangeType;
1083
+ return _utilities.findBreakingChanges;
1054
1084
  }
1055
1085
  });
1056
- Object.defineProperty(exports, "DangerousChangeType", {
1086
+ Object.defineProperty(exports, "findDangerousChanges", {
1057
1087
  enumerable: true,
1058
1088
  get: function get() {
1059
- return _utilities.DangerousChangeType;
1089
+ return _utilities.findDangerousChanges;
1060
1090
  }
1061
1091
  });
1062
1092
  Object.defineProperty(exports, "findDeprecatedUsages", {
@@ -1080,4 +1110,4 @@ var _validation = require("./validation");
1080
1110
 
1081
1111
  var _error = require("./error");
1082
1112
 
1083
- var _utilities = require("./utilities");
1113
+ var _utilities = require("./utilities");
package/index.js.flow CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -37,8 +37,9 @@ export { graphql, graphqlSync } from './graphql';
37
37
 
38
38
  // Create and operate on GraphQL type definitions and schema.
39
39
  export {
40
- GraphQLSchema,
41
40
  // Definitions
41
+ GraphQLSchema,
42
+ GraphQLDirective,
42
43
  GraphQLScalarType,
43
44
  GraphQLObjectType,
44
45
  GraphQLInterfaceType,
@@ -47,10 +48,7 @@ export {
47
48
  GraphQLInputObjectType,
48
49
  GraphQLList,
49
50
  GraphQLNonNull,
50
- GraphQLDirective,
51
- // "Enum" of Type Kinds
52
- TypeKind,
53
- // Scalars
51
+ // Standard GraphQL Scalars
54
52
  specifiedScalarTypes,
55
53
  GraphQLInt,
56
54
  GraphQLFloat,
@@ -62,12 +60,10 @@ export {
62
60
  GraphQLIncludeDirective,
63
61
  GraphQLSkipDirective,
64
62
  GraphQLDeprecatedDirective,
63
+ // "Enum" of Type Kinds
64
+ TypeKind,
65
65
  // Constant Deprecation Reason
66
66
  DEFAULT_DEPRECATION_REASON,
67
- // Meta-field definitions.
68
- SchemaMetaFieldDef,
69
- TypeMetaFieldDef,
70
- TypeNameMetaFieldDef,
71
67
  // GraphQL Types for introspection.
72
68
  introspectionTypes,
73
69
  __Schema,
@@ -78,6 +74,10 @@ export {
78
74
  __InputValue,
79
75
  __EnumValue,
80
76
  __TypeKind,
77
+ // Meta-field definitions.
78
+ SchemaMetaFieldDef,
79
+ TypeMetaFieldDef,
80
+ TypeNameMetaFieldDef,
81
81
  // Predicates
82
82
  isSchema,
83
83
  isDirective,
@@ -143,6 +143,7 @@ export type {
143
143
  GraphQLNamedType,
144
144
  Thunk,
145
145
  GraphQLSchemaConfig,
146
+ GraphQLDirectiveConfig,
146
147
  GraphQLArgument,
147
148
  GraphQLArgumentConfig,
148
149
  GraphQLEnumTypeConfig,
@@ -168,7 +169,6 @@ export type {
168
169
  GraphQLScalarTypeConfig,
169
170
  GraphQLTypeResolver,
170
171
  GraphQLUnionTypeConfig,
171
- GraphQLDirectiveConfig,
172
172
  GraphQLScalarSerializer,
173
173
  GraphQLScalarValueParser,
174
174
  GraphQLScalarLiteralParser,
@@ -178,6 +178,9 @@ export type {
178
178
  export {
179
179
  Source,
180
180
  getLocation,
181
+ // Lex
182
+ createLexer,
183
+ TokenKind,
181
184
  // Parse
182
185
  parse,
183
186
  parseValue,
@@ -189,10 +192,9 @@ export {
189
192
  visitInParallel,
190
193
  visitWithTypeInfo,
191
194
  getVisitFn,
195
+ BREAK,
192
196
  Kind,
193
- TokenKind,
194
197
  DirectiveLocation,
195
- BREAK,
196
198
  // Predicates
197
199
  isDefinitionNode,
198
200
  isExecutableDefinitionNode,
@@ -209,16 +211,20 @@ export type {
209
211
  Lexer,
210
212
  ParseOptions,
211
213
  SourceLocation,
214
+ Location,
215
+ Token,
216
+ TokenKindEnum,
217
+ KindEnum,
218
+ DirectiveLocationEnum,
212
219
  // Visitor utilities
213
220
  ASTVisitor,
214
221
  Visitor,
215
222
  VisitFn,
216
223
  VisitorKeyMap,
217
224
  // AST nodes
218
- Location,
219
- Token,
220
225
  ASTNode,
221
226
  ASTKindToNode,
227
+ // Each kind of AST node
222
228
  NameNode,
223
229
  DocumentNode,
224
230
  DefinitionNode,
@@ -272,15 +278,13 @@ export type {
272
278
  UnionTypeExtensionNode,
273
279
  EnumTypeExtensionNode,
274
280
  InputObjectTypeExtensionNode,
275
- KindEnum,
276
- TokenKindEnum,
277
- DirectiveLocationEnum,
278
281
  } from './language';
279
282
 
280
283
  // Execute GraphQL queries.
281
284
  export {
282
285
  execute,
283
286
  defaultFieldResolver,
287
+ defaultTypeResolver,
284
288
  responsePathAsArray,
285
289
  getDirectiveValues,
286
290
  } from './execution';
@@ -289,7 +293,7 @@ export type { ExecutionArgs, ExecutionResult } from './execution';
289
293
 
290
294
  export { subscribe, createSourceEventStream } from './subscription';
291
295
 
292
- // Validate GraphQL queries.
296
+ // Validate GraphQL documents.
293
297
  export {
294
298
  validate,
295
299
  ValidationContext,
@@ -326,7 +330,13 @@ export {
326
330
  export type { ValidationRule } from './validation';
327
331
 
328
332
  // Create, format, and print GraphQL errors.
329
- export { GraphQLError, formatError, printError } from './error';
333
+ export {
334
+ GraphQLError,
335
+ syntaxError,
336
+ locatedError,
337
+ printError,
338
+ formatError,
339
+ } from './error';
330
340
 
331
341
  export type { GraphQLFormattedError } from './error';
332
342
 
@@ -335,13 +345,13 @@ export {
335
345
  // Produce the GraphQL query recommended for a full schema introspection.
336
346
  // Accepts optional IntrospectionOptions.
337
347
  getIntrospectionQuery,
338
- // @deprecated: use getIntrospectionQuery - will be removed in v15
348
+ // @deprecated: use getIntrospectionQuery - will be removed in v15.
339
349
  introspectionQuery,
340
- // Gets the target Operation from a Document
350
+ // Gets the target Operation from a Document.
341
351
  getOperationAST,
342
352
  // Gets the Type for the target Operation AST.
343
353
  getOperationRootType,
344
- // Convert a GraphQLSchema to an IntrospectionQuery
354
+ // Convert a GraphQLSchema to an IntrospectionQuery.
345
355
  introspectionFromSchema,
346
356
  // Build a GraphQLSchema from an introspection result.
347
357
  buildClientSchema,
@@ -350,7 +360,7 @@ export {
350
360
  // Build a GraphQLSchema from a GraphQL schema language document.
351
361
  buildSchema,
352
362
  // @deprecated: Get the description from a schema AST node and supports legacy
353
- // syntax for specifying descriptions - will be removed in v16
363
+ // syntax for specifying descriptions - will be removed in v16.
354
364
  getDescription,
355
365
  // Extends an existing GraphQLSchema from a parsed GraphQL Schema
356
366
  // language AST.
@@ -359,11 +369,11 @@ export {
359
369
  lexicographicSortSchema,
360
370
  // Print a GraphQLSchema to GraphQL Schema language.
361
371
  printSchema,
372
+ // Print a GraphQLType to GraphQL Schema language.
373
+ printType,
362
374
  // Prints the built-in introspection schema in the Schema Language
363
375
  // format.
364
376
  printIntrospectionSchema,
365
- // Print a GraphQLType to GraphQL Schema language.
366
- printType,
367
377
  // Create a GraphQLType from a GraphQL language AST.
368
378
  typeFromAST,
369
379
  // Create a JavaScript value from a GraphQL language AST with a Type.
@@ -385,6 +395,9 @@ export {
385
395
  concatAST,
386
396
  // Separates an AST into an AST per Operation.
387
397
  separateOperations,
398
+ // Strips characters that are not significant to the validity or execution
399
+ // of a GraphQL document.
400
+ stripIgnoredCharacters,
388
401
  // Comparators for types
389
402
  isEqualType,
390
403
  isTypeSubTypeOf,
@@ -394,38 +407,38 @@ export {
394
407
  // Determine if a string is a valid GraphQL name.
395
408
  isValidNameError,
396
409
  // Compares two GraphQLSchemas and detects breaking changes.
397
- findBreakingChanges,
398
- findDangerousChanges,
399
410
  BreakingChangeType,
400
411
  DangerousChangeType,
412
+ findBreakingChanges,
413
+ findDangerousChanges,
401
414
  // Report all deprecated usage within a GraphQL document.
402
415
  findDeprecatedUsages,
403
416
  } from './utilities';
404
417
 
405
418
  export type {
406
- BuildSchemaOptions,
407
- BreakingChange,
408
- DangerousChange,
409
419
  IntrospectionOptions,
410
- IntrospectionDirective,
420
+ IntrospectionQuery,
421
+ IntrospectionSchema,
422
+ IntrospectionType,
423
+ IntrospectionInputType,
424
+ IntrospectionOutputType,
425
+ IntrospectionScalarType,
426
+ IntrospectionObjectType,
427
+ IntrospectionInterfaceType,
428
+ IntrospectionUnionType,
411
429
  IntrospectionEnumType,
412
- IntrospectionEnumValue,
413
- IntrospectionField,
414
430
  IntrospectionInputObjectType,
415
- IntrospectionInputType,
431
+ IntrospectionTypeRef,
416
432
  IntrospectionInputTypeRef,
417
- IntrospectionInputValue,
418
- IntrospectionInterfaceType,
419
- IntrospectionListTypeRef,
433
+ IntrospectionOutputTypeRef,
420
434
  IntrospectionNamedTypeRef,
435
+ IntrospectionListTypeRef,
421
436
  IntrospectionNonNullTypeRef,
422
- IntrospectionObjectType,
423
- IntrospectionOutputType,
424
- IntrospectionOutputTypeRef,
425
- IntrospectionQuery,
426
- IntrospectionScalarType,
427
- IntrospectionSchema,
428
- IntrospectionType,
429
- IntrospectionTypeRef,
430
- IntrospectionUnionType,
437
+ IntrospectionField,
438
+ IntrospectionInputValue,
439
+ IntrospectionEnumValue,
440
+ IntrospectionDirective,
441
+ BuildSchemaOptions,
442
+ BreakingChange,
443
+ DangerousChange,
431
444
  } from './utilities';
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -33,53 +33,54 @@
33
33
  // The primary entry point into fulfilling a GraphQL request.
34
34
  export { graphql, graphqlSync } from './graphql'; // Create and operate on GraphQL type definitions and schema.
35
35
 
36
- export { GraphQLSchema, // Definitions
37
- GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, GraphQLDirective, // "Enum" of Type Kinds
38
- TypeKind, // Scalars
36
+ export { // Definitions
37
+ GraphQLSchema, GraphQLDirective, GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, // Standard GraphQL Scalars
39
38
  specifiedScalarTypes, GraphQLInt, GraphQLFloat, GraphQLString, GraphQLBoolean, GraphQLID, // Built-in Directives defined by the Spec
40
- specifiedDirectives, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, // Constant Deprecation Reason
41
- DEFAULT_DEPRECATION_REASON, // Meta-field definitions.
42
- SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, // GraphQL Types for introspection.
43
- introspectionTypes, __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind, // Predicates
39
+ specifiedDirectives, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, // "Enum" of Type Kinds
40
+ TypeKind, // Constant Deprecation Reason
41
+ DEFAULT_DEPRECATION_REASON, // GraphQL Types for introspection.
42
+ introspectionTypes, __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind, // Meta-field definitions.
43
+ SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, // Predicates
44
44
  isSchema, isDirective, isType, isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isListType, isNonNullType, isInputType, isOutputType, isLeafType, isCompositeType, isAbstractType, isWrappingType, isNullableType, isNamedType, isRequiredArgument, isRequiredInputField, isSpecifiedScalarType, isIntrospectionType, isSpecifiedDirective, // Assertions
45
45
  assertSchema, assertDirective, assertType, assertScalarType, assertObjectType, assertInterfaceType, assertUnionType, assertEnumType, assertInputObjectType, assertListType, assertNonNullType, assertInputType, assertOutputType, assertLeafType, assertCompositeType, assertAbstractType, assertWrappingType, assertNullableType, assertNamedType, // Un-modifiers
46
46
  getNullableType, getNamedType, // Validate GraphQL schema.
47
47
  validateSchema, assertValidSchema } from './type';
48
48
  // Parse and operate on GraphQL language source files.
49
- export { Source, getLocation, // Parse
49
+ export { Source, getLocation, // Lex
50
+ createLexer, TokenKind, // Parse
50
51
  parse, parseValue, parseType, // Print
51
52
  print, // Visit
52
- visit, visitInParallel, visitWithTypeInfo, getVisitFn, Kind, TokenKind, DirectiveLocation, BREAK, // Predicates
53
+ visit, visitInParallel, visitWithTypeInfo, getVisitFn, BREAK, Kind, DirectiveLocation, // Predicates
53
54
  isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from './language';
54
55
  // Execute GraphQL queries.
55
- export { execute, defaultFieldResolver, responsePathAsArray, getDirectiveValues } from './execution';
56
- export { subscribe, createSourceEventStream } from './subscription'; // Validate GraphQL queries.
56
+ export { execute, defaultFieldResolver, defaultTypeResolver, responsePathAsArray, getDirectiveValues } from './execution';
57
+ export { subscribe, createSourceEventStream } from './subscription'; // Validate GraphQL documents.
57
58
 
58
59
  export { validate, ValidationContext, // All validation rules in the GraphQL Specification.
59
60
  specifiedRules, // Individual validation rules.
60
61
  FieldsOnCorrectTypeRule, FragmentsOnCompositeTypesRule, KnownArgumentNamesRule, KnownDirectivesRule, KnownFragmentNamesRule, KnownTypeNamesRule, LoneAnonymousOperationRule, NoFragmentCyclesRule, NoUndefinedVariablesRule, NoUnusedFragmentsRule, NoUnusedVariablesRule, OverlappingFieldsCanBeMergedRule, PossibleFragmentSpreadsRule, ProvidedRequiredArgumentsRule, ScalarLeafsRule, SingleFieldSubscriptionsRule, UniqueArgumentNamesRule, UniqueDirectivesPerLocationRule, UniqueFragmentNamesRule, UniqueInputFieldNamesRule, UniqueOperationNamesRule, UniqueVariableNamesRule, ValuesOfCorrectTypeRule, VariablesAreInputTypesRule, VariablesInAllowedPositionRule } from './validation';
61
62
  // Create, format, and print GraphQL errors.
62
- export { GraphQLError, formatError, printError } from './error';
63
+ export { GraphQLError, syntaxError, locatedError, printError, formatError } from './error';
63
64
  // Utilities for operating on GraphQL type schema and parsed sources.
64
65
  export { // Produce the GraphQL query recommended for a full schema introspection.
65
66
  // Accepts optional IntrospectionOptions.
66
- getIntrospectionQuery, // @deprecated: use getIntrospectionQuery - will be removed in v15
67
- introspectionQuery, // Gets the target Operation from a Document
67
+ getIntrospectionQuery, // @deprecated: use getIntrospectionQuery - will be removed in v15.
68
+ introspectionQuery, // Gets the target Operation from a Document.
68
69
  getOperationAST, // Gets the Type for the target Operation AST.
69
- getOperationRootType, // Convert a GraphQLSchema to an IntrospectionQuery
70
+ getOperationRootType, // Convert a GraphQLSchema to an IntrospectionQuery.
70
71
  introspectionFromSchema, // Build a GraphQLSchema from an introspection result.
71
72
  buildClientSchema, // Build a GraphQLSchema from a parsed GraphQL Schema language AST.
72
73
  buildASTSchema, // Build a GraphQLSchema from a GraphQL schema language document.
73
74
  buildSchema, // @deprecated: Get the description from a schema AST node and supports legacy
74
- // syntax for specifying descriptions - will be removed in v16
75
+ // syntax for specifying descriptions - will be removed in v16.
75
76
  getDescription, // Extends an existing GraphQLSchema from a parsed GraphQL Schema
76
77
  // language AST.
77
78
  extendSchema, // Sort a GraphQLSchema.
78
79
  lexicographicSortSchema, // Print a GraphQLSchema to GraphQL Schema language.
79
- printSchema, // Prints the built-in introspection schema in the Schema Language
80
+ printSchema, // Print a GraphQLType to GraphQL Schema language.
81
+ printType, // Prints the built-in introspection schema in the Schema Language
80
82
  // format.
81
- printIntrospectionSchema, // Print a GraphQLType to GraphQL Schema language.
82
- printType, // Create a GraphQLType from a GraphQL language AST.
83
+ printIntrospectionSchema, // Create a GraphQLType from a GraphQL language AST.
83
84
  typeFromAST, // Create a JavaScript value from a GraphQL language AST with a Type.
84
85
  valueFromAST, // Create a JavaScript value from a GraphQL language AST without a Type.
85
86
  valueFromASTUntyped, // Create a GraphQL language AST from a JavaScript value.
@@ -90,9 +91,11 @@ coerceValue, // @deprecated use coerceValue - will be removed in v15
90
91
  isValidJSValue, // @deprecated use validation - will be removed in v15
91
92
  isValidLiteralValue, // Concatenates multiple AST together.
92
93
  concatAST, // Separates an AST into an AST per Operation.
93
- separateOperations, // Comparators for types
94
+ separateOperations, // Strips characters that are not significant to the validity or execution
95
+ // of a GraphQL document.
96
+ stripIgnoredCharacters, // Comparators for types
94
97
  isEqualType, isTypeSubTypeOf, doTypesOverlap, // Asserts a string is a valid GraphQL name.
95
98
  assertValidName, // Determine if a string is a valid GraphQL name.
96
99
  isValidNameError, // Compares two GraphQLSchemas and detects breaking changes.
97
- findBreakingChanges, findDangerousChanges, BreakingChangeType, DangerousChangeType, // Report all deprecated usage within a GraphQL document.
98
- findDeprecatedUsages } from './utilities';
100
+ BreakingChangeType, DangerousChangeType, findBreakingChanges, findDangerousChanges, // Report all deprecated usage within a GraphQL document.
101
+ findDeprecatedUsages } from './utilities';
package/jsutils/ObjMap.js CHANGED
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -7,4 +7,4 @@
7
7
  * @flow strict
8
8
  */
9
9
 
10
- export type MaybePromise<+T> = Promise<T> | T;
10
+ export type PromiseOrValue<+T> = Promise<T> | T;
@@ -0,0 +1 @@
1
+
package/jsutils/dedent.js CHANGED
@@ -10,7 +10,7 @@ var _invariant = _interopRequireDefault(require("./invariant"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
12
  /**
13
- * Copyright (c) 2017-present, Facebook, Inc.
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
@@ -63,4 +63,4 @@ function dedent(strings) {
63
63
  return next;
64
64
  }, '');
65
65
  return fixIndent(str);
66
- }
66
+ }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2017-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.