graphql 0.12.3 → 0.13.2

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 (412) hide show
  1. package/error/GraphQLError.js +2 -3
  2. package/error/GraphQLError.js.flow +3 -4
  3. package/{module/error/GraphQLError.js → error/GraphQLError.mjs} +2 -3
  4. package/error/formatError.js +1 -1
  5. package/error/formatError.js.flow +1 -1
  6. package/{module/error/formatError.js → error/formatError.mjs} +1 -1
  7. package/error/index.js.flow +1 -1
  8. package/{module/error/index.js → error/index.mjs} +1 -1
  9. package/error/locatedError.js +2 -1
  10. package/error/locatedError.js.flow +2 -1
  11. package/{module/error/locatedError.js → error/locatedError.mjs} +2 -1
  12. package/error/printError.js +1 -1
  13. package/error/printError.js.flow +1 -1
  14. package/{module/error/printError.js → error/printError.mjs} +1 -1
  15. package/error/syntaxError.js +1 -1
  16. package/error/syntaxError.js.flow +1 -1
  17. package/{module/error/syntaxError.js → error/syntaxError.mjs} +1 -1
  18. package/execution/execute.js +70 -90
  19. package/execution/execute.js.flow +83 -106
  20. package/{module/execution/execute.js → execution/execute.mjs} +53 -81
  21. package/execution/index.js.flow +1 -1
  22. package/{module/execution/index.js → execution/index.mjs} +1 -1
  23. package/execution/values.js +2 -6
  24. package/execution/values.js.flow +6 -7
  25. package/{module/execution/values.js → execution/values.mjs} +2 -2
  26. package/graphql.js +1 -1
  27. package/graphql.js.flow +3 -2
  28. package/{module/graphql.js → graphql.mjs} +1 -1
  29. package/index.js +24 -6
  30. package/index.js.flow +16 -2
  31. package/{module/index.js → index.mjs} +10 -2
  32. package/jsutils/MaybePromise.js +1 -0
  33. package/{module/jsutils/ObjMap.js.flow → jsutils/MaybePromise.js.flow} +2 -2
  34. package/{module/jsutils/ObjMap.js → jsutils/MaybePromise.mjs} +0 -0
  35. package/jsutils/ObjMap.js.flow +1 -1
  36. package/{module/language/ast.js → jsutils/ObjMap.mjs} +0 -0
  37. package/jsutils/dedent.js +23 -18
  38. package/jsutils/dedent.js.flow +21 -20
  39. package/jsutils/dedent.mjs +50 -0
  40. package/jsutils/find.js +1 -1
  41. package/jsutils/find.js.flow +1 -1
  42. package/{module/jsutils/find.js → jsutils/find.mjs} +1 -1
  43. package/jsutils/instanceOf.js +17 -16
  44. package/jsutils/instanceOf.js.flow +21 -15
  45. package/jsutils/instanceOf.mjs +31 -0
  46. package/jsutils/invariant.js +1 -1
  47. package/jsutils/invariant.js.flow +1 -1
  48. package/{module/jsutils/invariant.js → jsutils/invariant.mjs} +1 -1
  49. package/jsutils/isInvalid.js +1 -1
  50. package/jsutils/isInvalid.js.flow +1 -1
  51. package/{module/jsutils/isInvalid.js → jsutils/isInvalid.mjs} +1 -1
  52. package/jsutils/isNullish.js +1 -1
  53. package/jsutils/isNullish.js.flow +1 -1
  54. package/{module/jsutils/isNullish.js → jsutils/isNullish.mjs} +1 -1
  55. package/jsutils/isPromise.js +24 -0
  56. package/jsutils/isPromise.js.flow +20 -0
  57. package/jsutils/isPromise.mjs +18 -0
  58. package/jsutils/keyMap.js +1 -1
  59. package/jsutils/keyMap.js.flow +1 -1
  60. package/{module/jsutils/keyMap.js → jsutils/keyMap.mjs} +1 -1
  61. package/jsutils/keyValMap.js +1 -1
  62. package/jsutils/keyValMap.js.flow +1 -1
  63. package/{module/jsutils/keyValMap.js → jsutils/keyValMap.mjs} +1 -1
  64. package/jsutils/memoize3.js +48 -0
  65. package/jsutils/memoize3.js.flow +44 -0
  66. package/jsutils/memoize3.mjs +42 -0
  67. package/jsutils/objectValues.js +24 -0
  68. package/jsutils/objectValues.js.flow +18 -0
  69. package/jsutils/objectValues.mjs +19 -0
  70. package/jsutils/orList.js +1 -1
  71. package/jsutils/orList.js.flow +1 -1
  72. package/{module/jsutils/orList.js → jsutils/orList.mjs} +1 -1
  73. package/jsutils/promiseForObject.js +34 -0
  74. package/jsutils/promiseForObject.js.flow +30 -0
  75. package/jsutils/promiseForObject.mjs +28 -0
  76. package/jsutils/promiseReduce.js +34 -0
  77. package/jsutils/promiseReduce.js.flow +32 -0
  78. package/jsutils/promiseReduce.mjs +26 -0
  79. package/jsutils/quotedOrList.js +1 -1
  80. package/jsutils/quotedOrList.js.flow +1 -1
  81. package/{module/jsutils/quotedOrList.js → jsutils/quotedOrList.mjs} +1 -1
  82. package/jsutils/suggestionList.js +1 -1
  83. package/jsutils/suggestionList.js.flow +1 -1
  84. package/{module/jsutils/suggestionList.js → jsutils/suggestionList.mjs} +1 -1
  85. package/language/ast.js.flow +3 -30
  86. package/language/ast.mjs +0 -0
  87. package/language/blockStringValue.js +1 -1
  88. package/language/blockStringValue.js.flow +1 -1
  89. package/{module/language/blockStringValue.js → language/blockStringValue.mjs} +1 -1
  90. package/language/directiveLocation.js +3 -3
  91. package/language/directiveLocation.js.flow +4 -4
  92. package/{module/language/directiveLocation.js → language/directiveLocation.mjs} +3 -3
  93. package/language/index.js +10 -10
  94. package/language/index.js.flow +5 -4
  95. package/{module/language/index.js → language/index.mjs} +3 -3
  96. package/language/kinds.js +70 -71
  97. package/language/kinds.js.flow +71 -71
  98. package/language/kinds.mjs +79 -0
  99. package/language/lexer.js +73 -87
  100. package/language/lexer.js.flow +87 -93
  101. package/{module/language/lexer.js → language/lexer.mjs} +73 -87
  102. package/language/location.js +1 -1
  103. package/language/location.js.flow +1 -1
  104. package/{module/language/location.js → language/location.mjs} +1 -1
  105. package/language/parser.js +68 -58
  106. package/language/parser.js.flow +104 -110
  107. package/{module/language/parser.js → language/parser.mjs} +69 -59
  108. package/language/printer.js +52 -55
  109. package/language/printer.js.flow +74 -120
  110. package/{module/language/printer.js → language/printer.mjs} +52 -55
  111. package/language/source.js +1 -1
  112. package/language/source.js.flow +1 -1
  113. package/{module/language/source.js → language/source.mjs} +1 -1
  114. package/language/visitor.js +1 -1
  115. package/language/visitor.js.flow +1 -1
  116. package/{module/language/visitor.js → language/visitor.mjs} +1 -1
  117. package/package.json +4 -9
  118. package/subscription/asyncIteratorReject.js +1 -1
  119. package/subscription/asyncIteratorReject.js.flow +1 -1
  120. package/{module/subscription/asyncIteratorReject.js → subscription/asyncIteratorReject.mjs} +1 -1
  121. package/subscription/index.js.flow +1 -1
  122. package/{module/subscription/index.js → subscription/index.mjs} +1 -1
  123. package/subscription/mapAsyncIterator.js +3 -1
  124. package/subscription/mapAsyncIterator.js.flow +7 -4
  125. package/{module/subscription/mapAsyncIterator.js → subscription/mapAsyncIterator.mjs} +4 -1
  126. package/subscription/subscribe.js +1 -1
  127. package/subscription/subscribe.js.flow +1 -1
  128. package/{module/subscription/subscribe.js → subscription/subscribe.mjs} +1 -1
  129. package/type/definition.js +76 -10
  130. package/type/definition.js.flow +105 -13
  131. package/{module/type/definition.js → type/definition.mjs} +72 -4
  132. package/type/directives.js +4 -4
  133. package/type/directives.js.flow +3 -3
  134. package/{module/type/directives.js → type/directives.mjs} +8 -8
  135. package/type/index.js +2 -5
  136. package/type/index.js.flow +6 -5
  137. package/{module/type/index.js → type/index.mjs} +3 -5
  138. package/type/introspection.js +34 -41
  139. package/type/introspection.js.flow +7 -10
  140. package/{module/type/introspection.js → type/introspection.mjs} +6 -15
  141. package/type/scalars.js +6 -10
  142. package/type/scalars.js.flow +2 -2
  143. package/{module/type/scalars.js → type/scalars.mjs} +2 -2
  144. package/type/schema.js +39 -15
  145. package/type/schema.js.flow +73 -22
  146. package/{module/type/schema.js → type/schema.mjs} +37 -16
  147. package/type/validate.js +33 -30
  148. package/type/validate.js.flow +40 -37
  149. package/{module/type/validate.js → type/validate.mjs} +30 -30
  150. package/utilities/TypeInfo.js +23 -27
  151. package/utilities/TypeInfo.js.flow +2 -2
  152. package/{module/utilities/TypeInfo.js → utilities/TypeInfo.mjs} +2 -2
  153. package/utilities/assertValidName.js +2 -6
  154. package/utilities/assertValidName.js.flow +2 -10
  155. package/{module/utilities/assertValidName.js → utilities/assertValidName.mjs} +2 -6
  156. package/utilities/astFromValue.js +37 -37
  157. package/utilities/astFromValue.js.flow +36 -44
  158. package/{module/utilities/astFromValue.js → utilities/astFromValue.mjs} +26 -25
  159. package/utilities/buildASTSchema.js +65 -82
  160. package/utilities/buildASTSchema.js.flow +52 -59
  161. package/{module/utilities/buildASTSchema.js → utilities/buildASTSchema.mjs} +48 -62
  162. package/utilities/buildClientSchema.js +12 -15
  163. package/utilities/buildClientSchema.js.flow +7 -11
  164. package/{module/utilities/buildClientSchema.js → utilities/buildClientSchema.mjs} +4 -5
  165. package/utilities/coerceValue.js +1 -1
  166. package/utilities/coerceValue.js.flow +1 -1
  167. package/{module/utilities/coerceValue.js → utilities/coerceValue.mjs} +1 -1
  168. package/utilities/concatAST.js +1 -1
  169. package/utilities/concatAST.js.flow +1 -1
  170. package/{module/utilities/concatAST.js → utilities/concatAST.mjs} +1 -1
  171. package/utilities/extendSchema.js +91 -77
  172. package/utilities/extendSchema.js.flow +93 -68
  173. package/{module/utilities/extendSchema.js → utilities/extendSchema.mjs} +65 -52
  174. package/utilities/findBreakingChanges.js +1 -1
  175. package/utilities/findBreakingChanges.js.flow +1 -1
  176. package/{module/utilities/findBreakingChanges.js → utilities/findBreakingChanges.mjs} +1 -1
  177. package/utilities/findDeprecatedUsages.js +1 -1
  178. package/utilities/findDeprecatedUsages.js.flow +1 -1
  179. package/{module/utilities/findDeprecatedUsages.js → utilities/findDeprecatedUsages.mjs} +1 -1
  180. package/utilities/getOperationAST.js +2 -2
  181. package/utilities/getOperationAST.js.flow +3 -3
  182. package/{module/utilities/getOperationAST.js → utilities/getOperationAST.mjs} +3 -3
  183. package/utilities/index.js +30 -0
  184. package/utilities/index.js.flow +10 -3
  185. package/{module/utilities/index.js → utilities/index.mjs} +10 -3
  186. package/utilities/introspectionFromSchema.js +43 -0
  187. package/utilities/introspectionFromSchema.js.flow +37 -0
  188. package/utilities/introspectionFromSchema.mjs +31 -0
  189. package/utilities/introspectionQuery.js +1 -1
  190. package/utilities/introspectionQuery.js.flow +1 -1
  191. package/{module/utilities/introspectionQuery.js → utilities/introspectionQuery.mjs} +1 -1
  192. package/utilities/isValidJSValue.js +1 -1
  193. package/utilities/isValidJSValue.js.flow +1 -1
  194. package/{module/utilities/isValidJSValue.js → utilities/isValidJSValue.mjs} +1 -1
  195. package/utilities/isValidLiteralValue.js +8 -4
  196. package/utilities/isValidLiteralValue.js.flow +4 -4
  197. package/{module/utilities/isValidLiteralValue.js → utilities/isValidLiteralValue.mjs} +4 -4
  198. package/utilities/lexicographicSortSchema.js +243 -0
  199. package/utilities/lexicographicSortSchema.js.flow +198 -0
  200. package/utilities/lexicographicSortSchema.mjs +225 -0
  201. package/utilities/schemaPrinter.js +31 -29
  202. package/utilities/schemaPrinter.js.flow +28 -15
  203. package/{module/utilities/schemaPrinter.js → utilities/schemaPrinter.mjs} +21 -20
  204. package/utilities/separateOperations.js +1 -1
  205. package/utilities/separateOperations.js.flow +1 -1
  206. package/{module/utilities/separateOperations.js → utilities/separateOperations.mjs} +1 -1
  207. package/utilities/typeComparators.js +7 -10
  208. package/utilities/typeComparators.js.flow +7 -10
  209. package/{module/utilities/typeComparators.js → utilities/typeComparators.mjs} +7 -10
  210. package/utilities/typeFromAST.js +7 -11
  211. package/utilities/typeFromAST.js.flow +3 -3
  212. package/{module/utilities/typeFromAST.js → utilities/typeFromAST.mjs} +3 -3
  213. package/utilities/valueFromAST.js +26 -28
  214. package/utilities/valueFromAST.js.flow +14 -23
  215. package/{module/utilities/valueFromAST.js → utilities/valueFromAST.mjs} +9 -10
  216. package/utilities/valueFromASTUntyped.js +17 -22
  217. package/utilities/valueFromASTUntyped.js.flow +6 -7
  218. package/{module/utilities/valueFromASTUntyped.js → utilities/valueFromASTUntyped.mjs} +6 -7
  219. package/validation/ValidationContext.js +184 -0
  220. package/{module/validation/validate.js.flow → validation/ValidationContext.js.flow} +4 -60
  221. package/{module/validation/validate.js → validation/ValidationContext.mjs} +15 -57
  222. package/validation/index.js +12 -7
  223. package/validation/index.js.flow +6 -2
  224. package/{module/validation/index.js → validation/index.mjs} +6 -2
  225. package/validation/rules/ExecutableDefinitions.js +3 -3
  226. package/validation/rules/ExecutableDefinitions.js.flow +6 -10
  227. package/{module/validation/rules/ExecutableDefinitions.js → validation/rules/ExecutableDefinitions.mjs} +4 -4
  228. package/validation/rules/FieldsOnCorrectType.js +1 -1
  229. package/validation/rules/FieldsOnCorrectType.js.flow +2 -2
  230. package/{module/validation/rules/FieldsOnCorrectType.js → validation/rules/FieldsOnCorrectType.mjs} +1 -1
  231. package/validation/rules/FragmentsOnCompositeTypes.js +1 -1
  232. package/validation/rules/FragmentsOnCompositeTypes.js.flow +2 -2
  233. package/{module/validation/rules/FragmentsOnCompositeTypes.js → validation/rules/FragmentsOnCompositeTypes.mjs} +1 -1
  234. package/validation/rules/KnownArgumentNames.js +3 -3
  235. package/validation/rules/KnownArgumentNames.js.flow +6 -8
  236. package/{module/validation/rules/KnownArgumentNames.js → validation/rules/KnownArgumentNames.mjs} +4 -4
  237. package/validation/rules/KnownDirectives.js +23 -27
  238. package/validation/rules/KnownDirectives.js.flow +3 -3
  239. package/{module/validation/rules/KnownDirectives.js → validation/rules/KnownDirectives.mjs} +2 -2
  240. package/validation/rules/KnownFragmentNames.js +1 -1
  241. package/validation/rules/KnownFragmentNames.js.flow +2 -2
  242. package/{module/validation/rules/KnownFragmentNames.js → validation/rules/KnownFragmentNames.mjs} +1 -1
  243. package/validation/rules/KnownTypeNames.js +1 -1
  244. package/validation/rules/KnownTypeNames.js.flow +2 -2
  245. package/{module/validation/rules/KnownTypeNames.js → validation/rules/KnownTypeNames.mjs} +1 -1
  246. package/validation/rules/LoneAnonymousOperation.js +2 -2
  247. package/validation/rules/LoneAnonymousOperation.js.flow +4 -4
  248. package/{module/validation/rules/LoneAnonymousOperation.js → validation/rules/LoneAnonymousOperation.mjs} +3 -3
  249. package/validation/rules/NoFragmentCycles.js +1 -1
  250. package/validation/rules/NoFragmentCycles.js.flow +2 -2
  251. package/{module/validation/rules/NoFragmentCycles.js → validation/rules/NoFragmentCycles.mjs} +1 -1
  252. package/validation/rules/NoUndefinedVariables.js +1 -1
  253. package/validation/rules/NoUndefinedVariables.js.flow +2 -2
  254. package/{module/validation/rules/NoUndefinedVariables.js → validation/rules/NoUndefinedVariables.mjs} +1 -1
  255. package/validation/rules/NoUnusedFragments.js +1 -1
  256. package/validation/rules/NoUnusedFragments.js.flow +2 -2
  257. package/{module/validation/rules/NoUnusedFragments.js → validation/rules/NoUnusedFragments.mjs} +1 -1
  258. package/validation/rules/NoUnusedVariables.js +1 -1
  259. package/validation/rules/NoUnusedVariables.js.flow +2 -2
  260. package/{module/validation/rules/NoUnusedVariables.js → validation/rules/NoUnusedVariables.mjs} +1 -1
  261. package/validation/rules/OverlappingFieldsCanBeMerged.js +4 -8
  262. package/validation/rules/OverlappingFieldsCanBeMerged.js.flow +3 -3
  263. package/{module/validation/rules/OverlappingFieldsCanBeMerged.js → validation/rules/OverlappingFieldsCanBeMerged.mjs} +2 -2
  264. package/validation/rules/PossibleFragmentSpreads.js +1 -1
  265. package/validation/rules/PossibleFragmentSpreads.js.flow +2 -2
  266. package/{module/validation/rules/PossibleFragmentSpreads.js → validation/rules/PossibleFragmentSpreads.mjs} +1 -1
  267. package/validation/rules/ProvidedNonNullArguments.js +1 -1
  268. package/validation/rules/ProvidedNonNullArguments.js.flow +2 -2
  269. package/{module/validation/rules/ProvidedNonNullArguments.js → validation/rules/ProvidedNonNullArguments.mjs} +1 -1
  270. package/validation/rules/ScalarLeafs.js +1 -1
  271. package/validation/rules/ScalarLeafs.js.flow +2 -2
  272. package/{module/validation/rules/ScalarLeafs.js → validation/rules/ScalarLeafs.mjs} +1 -1
  273. package/validation/rules/SingleFieldSubscriptions.js +1 -1
  274. package/validation/rules/SingleFieldSubscriptions.js.flow +2 -2
  275. package/{module/validation/rules/SingleFieldSubscriptions.js → validation/rules/SingleFieldSubscriptions.mjs} +1 -1
  276. package/validation/rules/UniqueArgumentNames.js +1 -1
  277. package/validation/rules/UniqueArgumentNames.js.flow +2 -2
  278. package/{module/validation/rules/UniqueArgumentNames.js → validation/rules/UniqueArgumentNames.mjs} +1 -1
  279. package/validation/rules/UniqueDirectivesPerLocation.js +1 -1
  280. package/validation/rules/UniqueDirectivesPerLocation.js.flow +2 -2
  281. package/{module/validation/rules/UniqueDirectivesPerLocation.js → validation/rules/UniqueDirectivesPerLocation.mjs} +1 -1
  282. package/validation/rules/UniqueFragmentNames.js +1 -1
  283. package/validation/rules/UniqueFragmentNames.js.flow +2 -2
  284. package/{module/validation/rules/UniqueFragmentNames.js → validation/rules/UniqueFragmentNames.mjs} +1 -1
  285. package/validation/rules/UniqueInputFieldNames.js +1 -1
  286. package/validation/rules/UniqueInputFieldNames.js.flow +2 -2
  287. package/{module/validation/rules/UniqueInputFieldNames.js → validation/rules/UniqueInputFieldNames.mjs} +1 -1
  288. package/validation/rules/UniqueOperationNames.js +1 -1
  289. package/validation/rules/UniqueOperationNames.js.flow +2 -2
  290. package/{module/validation/rules/UniqueOperationNames.js → validation/rules/UniqueOperationNames.mjs} +1 -1
  291. package/validation/rules/UniqueVariableNames.js +1 -1
  292. package/validation/rules/UniqueVariableNames.js.flow +2 -2
  293. package/{module/validation/rules/UniqueVariableNames.js → validation/rules/UniqueVariableNames.mjs} +1 -1
  294. package/validation/rules/ValuesOfCorrectType.js +1 -1
  295. package/validation/rules/ValuesOfCorrectType.js.flow +2 -2
  296. package/{module/validation/rules/ValuesOfCorrectType.js → validation/rules/ValuesOfCorrectType.mjs} +1 -1
  297. package/validation/rules/VariablesAreInputTypes.js +1 -1
  298. package/validation/rules/VariablesAreInputTypes.js.flow +2 -2
  299. package/{module/validation/rules/VariablesAreInputTypes.js → validation/rules/VariablesAreInputTypes.mjs} +1 -1
  300. package/validation/rules/VariablesDefaultValueAllowed.js +1 -1
  301. package/validation/rules/VariablesDefaultValueAllowed.js.flow +2 -2
  302. package/{module/validation/rules/VariablesDefaultValueAllowed.js → validation/rules/VariablesDefaultValueAllowed.mjs} +1 -1
  303. package/validation/rules/VariablesInAllowedPosition.js +9 -11
  304. package/validation/rules/VariablesInAllowedPosition.js.flow +3 -4
  305. package/{module/validation/rules/VariablesInAllowedPosition.js → validation/rules/VariablesInAllowedPosition.mjs} +2 -3
  306. package/validation/specifiedRules.js +1 -1
  307. package/validation/specifiedRules.js.flow +2 -2
  308. package/{module/validation/specifiedRules.js → validation/specifiedRules.mjs} +1 -1
  309. package/validation/validate.js +14 -175
  310. package/validation/validate.js.flow +3 -209
  311. package/validation/validate.mjs +57 -0
  312. package/module/error/GraphQLError.js.flow +0 -209
  313. package/module/error/formatError.js.flow +0 -34
  314. package/module/error/index.js.flow +0 -16
  315. package/module/error/locatedError.js.flow +0 -37
  316. package/module/error/printError.js.flow +0 -82
  317. package/module/error/syntaxError.js.flow +0 -25
  318. package/module/execution/execute.js.flow +0 -1375
  319. package/module/execution/index.js.flow +0 -13
  320. package/module/execution/values.js.flow +0 -206
  321. package/module/graphql.js.flow +0 -202
  322. package/module/index.js.flow +0 -389
  323. package/module/jsutils/dedent.js +0 -45
  324. package/module/jsutils/dedent.js.flow +0 -49
  325. package/module/jsutils/find.js.flow +0 -19
  326. package/module/jsutils/instanceOf.js +0 -27
  327. package/module/jsutils/instanceOf.js.flow +0 -44
  328. package/module/jsutils/invariant.js.flow +0 -15
  329. package/module/jsutils/isInvalid.js.flow +0 -15
  330. package/module/jsutils/isNullish.js.flow +0 -15
  331. package/module/jsutils/keyMap.js.flow +0 -43
  332. package/module/jsutils/keyValMap.js.flow +0 -38
  333. package/module/jsutils/orList.js.flow +0 -24
  334. package/module/jsutils/quotedOrList.js.flow +0 -17
  335. package/module/jsutils/suggestionList.js.flow +0 -94
  336. package/module/language/ast.js.flow +0 -594
  337. package/module/language/blockStringValue.js.flow +0 -64
  338. package/module/language/directiveLocation.js.flow +0 -39
  339. package/module/language/index.js.flow +0 -84
  340. package/module/language/kinds.js +0 -80
  341. package/module/language/kinds.js.flow +0 -80
  342. package/module/language/lexer.js.flow +0 -762
  343. package/module/language/location.js.flow +0 -34
  344. package/module/language/parser.js.flow +0 -1537
  345. package/module/language/printer.js.flow +0 -311
  346. package/module/language/source.js.flow +0 -43
  347. package/module/language/visitor.js.flow +0 -476
  348. package/module/subscription/asyncIteratorReject.js.flow +0 -41
  349. package/module/subscription/index.js.flow +0 -10
  350. package/module/subscription/mapAsyncIterator.js.flow +0 -78
  351. package/module/subscription/subscribe.js.flow +0 -288
  352. package/module/type/definition.js.flow +0 -1225
  353. package/module/type/directives.js.flow +0 -168
  354. package/module/type/index.js.flow +0 -156
  355. package/module/type/introspection.js.flow +0 -482
  356. package/module/type/scalars.js.flow +0 -158
  357. package/module/type/schema.js.flow +0 -271
  358. package/module/type/validate.js.flow +0 -723
  359. package/module/type/wrappers.js +0 -80
  360. package/module/type/wrappers.js.flow +0 -91
  361. package/module/utilities/TypeInfo.js.flow +0 -296
  362. package/module/utilities/assertValidName.js.flow +0 -56
  363. package/module/utilities/astFromValue.js.flow +0 -159
  364. package/module/utilities/buildASTSchema.js.flow +0 -518
  365. package/module/utilities/buildClientSchema.js.flow +0 -418
  366. package/module/utilities/coerceValue.js.flow +0 -257
  367. package/module/utilities/concatAST.js.flow +0 -29
  368. package/module/utilities/extendSchema.js.flow +0 -374
  369. package/module/utilities/findBreakingChanges.js.flow +0 -851
  370. package/module/utilities/findDeprecatedUsages.js.flow +0 -68
  371. package/module/utilities/getOperationAST.js.flow +0 -40
  372. package/module/utilities/index.js.flow +0 -111
  373. package/module/utilities/introspectionQuery.js.flow +0 -271
  374. package/module/utilities/isValidJSValue.js.flow +0 -22
  375. package/module/utilities/isValidLiteralValue.js.flow +0 -36
  376. package/module/utilities/schemaPrinter.js.flow +0 -402
  377. package/module/utilities/separateOperations.js.flow +0 -100
  378. package/module/utilities/typeComparators.js.flow +0 -135
  379. package/module/utilities/typeFromAST.js.flow +0 -56
  380. package/module/utilities/valueFromAST.js.flow +0 -184
  381. package/module/utilities/valueFromASTUntyped.js.flow +0 -64
  382. package/module/validation/index.js.flow +0 -138
  383. package/module/validation/rules/ExecutableDefinitions.js.flow +0 -52
  384. package/module/validation/rules/FieldsOnCorrectType.js.flow +0 -144
  385. package/module/validation/rules/FragmentsOnCompositeTypes.js.flow +0 -74
  386. package/module/validation/rules/KnownArgumentNames.js.flow +0 -98
  387. package/module/validation/rules/KnownDirectives.js.flow +0 -116
  388. package/module/validation/rules/KnownFragmentNames.js.flow +0 -36
  389. package/module/validation/rules/KnownTypeNames.js.flow +0 -59
  390. package/module/validation/rules/LoneAnonymousOperation.js.flow +0 -41
  391. package/module/validation/rules/NoFragmentCycles.js.flow +0 -85
  392. package/module/validation/rules/NoUndefinedVariables.js.flow +0 -57
  393. package/module/validation/rules/NoUnusedFragments.js.flow +0 -59
  394. package/module/validation/rules/NoUnusedVariables.js.flow +0 -62
  395. package/module/validation/rules/OverlappingFieldsCanBeMerged.js.flow +0 -847
  396. package/module/validation/rules/PossibleFragmentSpreads.js.flow +0 -94
  397. package/module/validation/rules/ProvidedNonNullArguments.js.flow +0 -105
  398. package/module/validation/rules/ScalarLeafs.js.flow +0 -69
  399. package/module/validation/rules/SingleFieldSubscriptions.js.flow +0 -44
  400. package/module/validation/rules/UniqueArgumentNames.js.flow +0 -48
  401. package/module/validation/rules/UniqueDirectivesPerLocation.js.flow +0 -57
  402. package/module/validation/rules/UniqueFragmentNames.js.flow +0 -42
  403. package/module/validation/rules/UniqueInputFieldNames.js.flow +0 -53
  404. package/module/validation/rules/UniqueOperationNames.js.flow +0 -44
  405. package/module/validation/rules/UniqueVariableNames.js.flow +0 -44
  406. package/module/validation/rules/ValuesOfCorrectType.js.flow +0 -218
  407. package/module/validation/rules/VariablesAreInputTypes.js.flow +0 -48
  408. package/module/validation/rules/VariablesDefaultValueAllowed.js.flow +0 -55
  409. package/module/validation/rules/VariablesInAllowedPosition.js.flow +0 -83
  410. package/module/validation/specifiedRules.js.flow +0 -127
  411. package/type/wrappers.js +0 -89
  412. package/type/wrappers.js.flow +0 -91
@@ -1,24 +0,0 @@
1
- /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow
8
- */
9
-
10
- const MAX_LENGTH = 5;
11
-
12
- /**
13
- * Given [ A, B, C ] return 'A, B, or C'.
14
- */
15
- export default function orList(items: $ReadOnlyArray<string>): string {
16
- const selected = items.slice(0, MAX_LENGTH);
17
- return selected.reduce(
18
- (list, quoted, index) =>
19
- list +
20
- (selected.length > 2 ? ', ' : ' ') +
21
- (index === selected.length - 1 ? 'or ' : '') +
22
- quoted,
23
- );
24
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow
8
- */
9
-
10
- import orList from './orList';
11
-
12
- /**
13
- * Given [ A, B, C ] return '"A", "B", or "C"'.
14
- */
15
- export default function quotedOrList(items: $ReadOnlyArray<string>): string {
16
- return orList(items.map(item => `"${item}"`));
17
- }
@@ -1,94 +0,0 @@
1
- /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow
8
- */
9
-
10
- /**
11
- * Given an invalid input string and a list of valid options, returns a filtered
12
- * list of valid options sorted based on their similarity with the input.
13
- */
14
- export default function suggestionList(
15
- input: string,
16
- options: $ReadOnlyArray<string>,
17
- ): Array<string> {
18
- const optionsByDistance = Object.create(null);
19
- const oLength = options.length;
20
- const inputThreshold = input.length / 2;
21
- for (let i = 0; i < oLength; i++) {
22
- const distance = lexicalDistance(input, options[i]);
23
- const threshold = Math.max(inputThreshold, options[i].length / 2, 1);
24
- if (distance <= threshold) {
25
- optionsByDistance[options[i]] = distance;
26
- }
27
- }
28
- return Object.keys(optionsByDistance).sort(
29
- (a, b) => optionsByDistance[a] - optionsByDistance[b],
30
- );
31
- }
32
-
33
- /**
34
- * Computes the lexical distance between strings A and B.
35
- *
36
- * The "distance" between two strings is given by counting the minimum number
37
- * of edits needed to transform string A into string B. An edit can be an
38
- * insertion, deletion, or substitution of a single character, or a swap of two
39
- * adjacent characters.
40
- *
41
- * Includes a custom alteration from Damerau-Levenshtein to treat case changes
42
- * as a single edit which helps identify mis-cased values with an edit distance
43
- * of 1.
44
- *
45
- * This distance can be useful for detecting typos in input or sorting
46
- *
47
- * @param {string} a
48
- * @param {string} b
49
- * @return {int} distance in number of edits
50
- */
51
- function lexicalDistance(aStr, bStr) {
52
- if (aStr === bStr) {
53
- return 0;
54
- }
55
-
56
- let i;
57
- let j;
58
- const d = [];
59
- const a = aStr.toLowerCase();
60
- const b = bStr.toLowerCase();
61
- const aLength = a.length;
62
- const bLength = b.length;
63
-
64
- // Any case change counts as a single edit
65
- if (a === b) {
66
- return 1;
67
- }
68
-
69
- for (i = 0; i <= aLength; i++) {
70
- d[i] = [i];
71
- }
72
-
73
- for (j = 1; j <= bLength; j++) {
74
- d[0][j] = j;
75
- }
76
-
77
- for (i = 1; i <= aLength; i++) {
78
- for (j = 1; j <= bLength; j++) {
79
- const cost = a[i - 1] === b[j - 1] ? 0 : 1;
80
-
81
- d[i][j] = Math.min(
82
- d[i - 1][j] + 1,
83
- d[i][j - 1] + 1,
84
- d[i - 1][j - 1] + cost,
85
- );
86
-
87
- if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
88
- d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost);
89
- }
90
- }
91
- }
92
-
93
- return d[aLength][bLength];
94
- }
@@ -1,594 +0,0 @@
1
- /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow
8
- */
9
-
10
- import type { Source } from './source';
11
-
12
- /**
13
- * Contains a range of UTF-8 character offsets and token references that
14
- * identify the region of the source from which the AST derived.
15
- */
16
- export type Location = {
17
- /**
18
- * The character offset at which this Node begins.
19
- */
20
- +start: number,
21
-
22
- /**
23
- * The character offset at which this Node ends.
24
- */
25
- +end: number,
26
-
27
- /**
28
- * The Token at which this Node begins.
29
- */
30
- +startToken: Token,
31
-
32
- /**
33
- * The Token at which this Node ends.
34
- */
35
- +endToken: Token,
36
-
37
- /**
38
- * The Source document the AST represents.
39
- */
40
- +source: Source,
41
- };
42
-
43
- /**
44
- * Represents the different kinds of tokens in a GraphQL document.
45
- * This type is not inlined in `Token` to fix syntax highlighting on GitHub
46
- * *only*.
47
- */
48
- type TokenKind =
49
- | '<SOF>'
50
- | '<EOF>'
51
- | '!'
52
- | '$'
53
- | '('
54
- | ')'
55
- | '...'
56
- | ':'
57
- | '='
58
- | '@'
59
- | '['
60
- | ']'
61
- | '{'
62
- | '|'
63
- | '}'
64
- | 'Name'
65
- | 'Int'
66
- | 'Float'
67
- | 'String'
68
- | 'BlockString'
69
- | 'Comment';
70
-
71
- /**
72
- * Represents a range of characters represented by a lexical token
73
- * within a Source.
74
- */
75
- export type Token = {
76
- /**
77
- * The kind of Token.
78
- */
79
- +kind: TokenKind,
80
-
81
- /**
82
- * The character offset at which this Node begins.
83
- */
84
- +start: number,
85
-
86
- /**
87
- * The character offset at which this Node ends.
88
- */
89
- +end: number,
90
-
91
- /**
92
- * The 1-indexed line number on which this Token appears.
93
- */
94
- +line: number,
95
-
96
- /**
97
- * The 1-indexed column number at which this Token begins.
98
- */
99
- +column: number,
100
-
101
- /**
102
- * For non-punctuation tokens, represents the interpreted value of the token.
103
- */
104
- +value: string | void,
105
-
106
- /**
107
- * Tokens exist as nodes in a double-linked-list amongst all tokens
108
- * including ignored tokens. <SOF> is always the first node and <EOF>
109
- * the last.
110
- */
111
- +prev: Token | null,
112
- +next: Token | null,
113
- };
114
-
115
- /**
116
- * The list of all possible AST node types.
117
- */
118
- export type ASTNode =
119
- | NameNode
120
- | DocumentNode
121
- | OperationDefinitionNode
122
- | VariableDefinitionNode
123
- | VariableNode
124
- | SelectionSetNode
125
- | FieldNode
126
- | ArgumentNode
127
- | FragmentSpreadNode
128
- | InlineFragmentNode
129
- | FragmentDefinitionNode
130
- | IntValueNode
131
- | FloatValueNode
132
- | StringValueNode
133
- | BooleanValueNode
134
- | NullValueNode
135
- | EnumValueNode
136
- | ListValueNode
137
- | ObjectValueNode
138
- | ObjectFieldNode
139
- | DirectiveNode
140
- | NamedTypeNode
141
- | ListTypeNode
142
- | NonNullTypeNode
143
- | SchemaDefinitionNode
144
- | OperationTypeDefinitionNode
145
- | ScalarTypeDefinitionNode
146
- | ObjectTypeDefinitionNode
147
- | FieldDefinitionNode
148
- | InputValueDefinitionNode
149
- | InterfaceTypeDefinitionNode
150
- | UnionTypeDefinitionNode
151
- | EnumTypeDefinitionNode
152
- | EnumValueDefinitionNode
153
- | InputObjectTypeDefinitionNode
154
- | ScalarTypeExtensionNode
155
- | ObjectTypeExtensionNode
156
- | InterfaceTypeExtensionNode
157
- | UnionTypeExtensionNode
158
- | EnumTypeExtensionNode
159
- | InputObjectTypeExtensionNode
160
- | DirectiveDefinitionNode;
161
-
162
- /**
163
- * Utility type listing all nodes indexed by their kind.
164
- */
165
- export type ASTKindToNode = {
166
- Name: NameNode,
167
- Document: DocumentNode,
168
- OperationDefinition: OperationDefinitionNode,
169
- VariableDefinition: VariableDefinitionNode,
170
- Variable: VariableNode,
171
- SelectionSet: SelectionSetNode,
172
- Field: FieldNode,
173
- Argument: ArgumentNode,
174
- FragmentSpread: FragmentSpreadNode,
175
- InlineFragment: InlineFragmentNode,
176
- FragmentDefinition: FragmentDefinitionNode,
177
- IntValue: IntValueNode,
178
- FloatValue: FloatValueNode,
179
- StringValue: StringValueNode,
180
- BooleanValue: BooleanValueNode,
181
- NullValue: NullValueNode,
182
- EnumValue: EnumValueNode,
183
- ListValue: ListValueNode,
184
- ObjectValue: ObjectValueNode,
185
- ObjectField: ObjectFieldNode,
186
- Directive: DirectiveNode,
187
- NamedType: NamedTypeNode,
188
- ListType: ListTypeNode,
189
- NonNullType: NonNullTypeNode,
190
- SchemaDefinition: SchemaDefinitionNode,
191
- OperationTypeDefinition: OperationTypeDefinitionNode,
192
- ScalarTypeDefinition: ScalarTypeDefinitionNode,
193
- ObjectTypeDefinition: ObjectTypeDefinitionNode,
194
- FieldDefinition: FieldDefinitionNode,
195
- InputValueDefinition: InputValueDefinitionNode,
196
- InterfaceTypeDefinition: InterfaceTypeDefinitionNode,
197
- UnionTypeDefinition: UnionTypeDefinitionNode,
198
- EnumTypeDefinition: EnumTypeDefinitionNode,
199
- EnumValueDefinition: EnumValueDefinitionNode,
200
- InputObjectTypeDefinition: InputObjectTypeDefinitionNode,
201
- ScalarTypeExtension: ScalarTypeExtensionNode,
202
- ObjectTypeExtension: ObjectTypeExtensionNode,
203
- InterfaceTypeExtension: InterfaceTypeExtensionNode,
204
- UnionTypeExtension: UnionTypeExtensionNode,
205
- EnumTypeExtension: EnumTypeExtensionNode,
206
- InputObjectTypeExtension: InputObjectTypeExtensionNode,
207
- DirectiveDefinition: DirectiveDefinitionNode,
208
- };
209
-
210
- // Name
211
-
212
- export type NameNode = {
213
- +kind: 'Name',
214
- +loc?: Location,
215
- +value: string,
216
- };
217
-
218
- // Document
219
-
220
- export type DocumentNode = {
221
- +kind: 'Document',
222
- +loc?: Location,
223
- +definitions: $ReadOnlyArray<DefinitionNode>,
224
- };
225
-
226
- export type DefinitionNode =
227
- | ExecutableDefinitionNode
228
- | TypeSystemDefinitionNode; // experimental non-spec addition.
229
-
230
- export type ExecutableDefinitionNode =
231
- | OperationDefinitionNode
232
- | FragmentDefinitionNode;
233
-
234
- export type OperationDefinitionNode = {
235
- +kind: 'OperationDefinition',
236
- +loc?: Location,
237
- +operation: OperationTypeNode,
238
- +name?: NameNode,
239
- +variableDefinitions?: $ReadOnlyArray<VariableDefinitionNode>,
240
- +directives?: $ReadOnlyArray<DirectiveNode>,
241
- +selectionSet: SelectionSetNode,
242
- };
243
-
244
- export type OperationTypeNode = 'query' | 'mutation' | 'subscription';
245
-
246
- export type VariableDefinitionNode = {
247
- +kind: 'VariableDefinition',
248
- +loc?: Location,
249
- +variable: VariableNode,
250
- +type: TypeNode,
251
- +defaultValue?: ValueNode,
252
- };
253
-
254
- export type VariableNode = {
255
- +kind: 'Variable',
256
- +loc?: Location,
257
- +name: NameNode,
258
- };
259
-
260
- export type SelectionSetNode = {
261
- kind: 'SelectionSet',
262
- loc?: Location,
263
- selections: $ReadOnlyArray<SelectionNode>,
264
- };
265
-
266
- export type SelectionNode = FieldNode | FragmentSpreadNode | InlineFragmentNode;
267
-
268
- export type FieldNode = {
269
- +kind: 'Field',
270
- +loc?: Location,
271
- +alias?: NameNode,
272
- +name: NameNode,
273
- +arguments?: $ReadOnlyArray<ArgumentNode>,
274
- +directives?: $ReadOnlyArray<DirectiveNode>,
275
- +selectionSet?: SelectionSetNode,
276
- };
277
-
278
- export type ArgumentNode = {
279
- +kind: 'Argument',
280
- +loc?: Location,
281
- +name: NameNode,
282
- +value: ValueNode,
283
- };
284
-
285
- // Fragments
286
-
287
- export type FragmentSpreadNode = {
288
- +kind: 'FragmentSpread',
289
- +loc?: Location,
290
- +name: NameNode,
291
- +directives?: $ReadOnlyArray<DirectiveNode>,
292
- };
293
-
294
- export type InlineFragmentNode = {
295
- +kind: 'InlineFragment',
296
- +loc?: Location,
297
- +typeCondition?: NamedTypeNode,
298
- +directives?: $ReadOnlyArray<DirectiveNode>,
299
- +selectionSet: SelectionSetNode,
300
- };
301
-
302
- export type FragmentDefinitionNode = {
303
- +kind: 'FragmentDefinition',
304
- +loc?: Location,
305
- +name: NameNode,
306
- // Note: fragment variable definitions are experimental and may be changed
307
- // or removed in the future.
308
- +variableDefinitions?: $ReadOnlyArray<VariableDefinitionNode>,
309
- +typeCondition: NamedTypeNode,
310
- +directives?: $ReadOnlyArray<DirectiveNode>,
311
- +selectionSet: SelectionSetNode,
312
- };
313
-
314
- // Values
315
-
316
- export type ValueNode =
317
- | VariableNode
318
- | IntValueNode
319
- | FloatValueNode
320
- | StringValueNode
321
- | BooleanValueNode
322
- | NullValueNode
323
- | EnumValueNode
324
- | ListValueNode
325
- | ObjectValueNode;
326
-
327
- export type IntValueNode = {
328
- +kind: 'IntValue',
329
- +loc?: Location,
330
- +value: string,
331
- };
332
-
333
- export type FloatValueNode = {
334
- +kind: 'FloatValue',
335
- +loc?: Location,
336
- +value: string,
337
- };
338
-
339
- export type StringValueNode = {
340
- +kind: 'StringValue',
341
- +loc?: Location,
342
- +value: string,
343
- +block?: boolean,
344
- };
345
-
346
- export type BooleanValueNode = {
347
- +kind: 'BooleanValue',
348
- +loc?: Location,
349
- +value: boolean,
350
- };
351
-
352
- export type NullValueNode = {
353
- +kind: 'NullValue',
354
- +loc?: Location,
355
- };
356
-
357
- export type EnumValueNode = {
358
- +kind: 'EnumValue',
359
- +loc?: Location,
360
- +value: string,
361
- };
362
-
363
- export type ListValueNode = {
364
- +kind: 'ListValue',
365
- +loc?: Location,
366
- +values: $ReadOnlyArray<ValueNode>,
367
- };
368
-
369
- export type ObjectValueNode = {
370
- +kind: 'ObjectValue',
371
- +loc?: Location,
372
- +fields: $ReadOnlyArray<ObjectFieldNode>,
373
- };
374
-
375
- export type ObjectFieldNode = {
376
- +kind: 'ObjectField',
377
- +loc?: Location,
378
- +name: NameNode,
379
- +value: ValueNode,
380
- };
381
-
382
- // Directives
383
-
384
- export type DirectiveNode = {
385
- +kind: 'Directive',
386
- +loc?: Location,
387
- +name: NameNode,
388
- +arguments?: $ReadOnlyArray<ArgumentNode>,
389
- };
390
-
391
- // Type Reference
392
-
393
- export type TypeNode = NamedTypeNode | ListTypeNode | NonNullTypeNode;
394
-
395
- export type NamedTypeNode = {
396
- +kind: 'NamedType',
397
- +loc?: Location,
398
- +name: NameNode,
399
- };
400
-
401
- export type ListTypeNode = {
402
- +kind: 'ListType',
403
- +loc?: Location,
404
- +type: TypeNode,
405
- };
406
-
407
- export type NonNullTypeNode = {
408
- +kind: 'NonNullType',
409
- +loc?: Location,
410
- +type: NamedTypeNode | ListTypeNode,
411
- };
412
-
413
- // Type System Definition
414
-
415
- export type TypeSystemDefinitionNode =
416
- | SchemaDefinitionNode
417
- | TypeDefinitionNode
418
- | TypeExtensionNode
419
- | DirectiveDefinitionNode;
420
-
421
- export type SchemaDefinitionNode = {
422
- +kind: 'SchemaDefinition',
423
- +loc?: Location,
424
- +directives: $ReadOnlyArray<DirectiveNode>,
425
- +operationTypes: $ReadOnlyArray<OperationTypeDefinitionNode>,
426
- };
427
-
428
- export type OperationTypeDefinitionNode = {
429
- +kind: 'OperationTypeDefinition',
430
- +loc?: Location,
431
- +operation: OperationTypeNode,
432
- +type: NamedTypeNode,
433
- };
434
-
435
- // Type Definition
436
-
437
- export type TypeDefinitionNode =
438
- | ScalarTypeDefinitionNode
439
- | ObjectTypeDefinitionNode
440
- | InterfaceTypeDefinitionNode
441
- | UnionTypeDefinitionNode
442
- | EnumTypeDefinitionNode
443
- | InputObjectTypeDefinitionNode;
444
-
445
- export type ScalarTypeDefinitionNode = {
446
- +kind: 'ScalarTypeDefinition',
447
- +loc?: Location,
448
- +description?: StringValueNode,
449
- +name: NameNode,
450
- +directives?: $ReadOnlyArray<DirectiveNode>,
451
- };
452
-
453
- export type ObjectTypeDefinitionNode = {
454
- +kind: 'ObjectTypeDefinition',
455
- +loc?: Location,
456
- +description?: StringValueNode,
457
- +name: NameNode,
458
- +interfaces?: $ReadOnlyArray<NamedTypeNode>,
459
- +directives?: $ReadOnlyArray<DirectiveNode>,
460
- +fields?: $ReadOnlyArray<FieldDefinitionNode>,
461
- };
462
-
463
- export type FieldDefinitionNode = {
464
- +kind: 'FieldDefinition',
465
- +loc?: Location,
466
- +description?: StringValueNode,
467
- +name: NameNode,
468
- +arguments?: $ReadOnlyArray<InputValueDefinitionNode>,
469
- +type: TypeNode,
470
- +directives?: $ReadOnlyArray<DirectiveNode>,
471
- };
472
-
473
- export type InputValueDefinitionNode = {
474
- +kind: 'InputValueDefinition',
475
- +loc?: Location,
476
- +description?: StringValueNode,
477
- +name: NameNode,
478
- +type: TypeNode,
479
- +defaultValue?: ValueNode,
480
- +directives?: $ReadOnlyArray<DirectiveNode>,
481
- };
482
-
483
- export type InterfaceTypeDefinitionNode = {
484
- +kind: 'InterfaceTypeDefinition',
485
- +loc?: Location,
486
- +description?: StringValueNode,
487
- +name: NameNode,
488
- +directives?: $ReadOnlyArray<DirectiveNode>,
489
- +fields?: $ReadOnlyArray<FieldDefinitionNode>,
490
- };
491
-
492
- export type UnionTypeDefinitionNode = {
493
- +kind: 'UnionTypeDefinition',
494
- +loc?: Location,
495
- +description?: StringValueNode,
496
- +name: NameNode,
497
- +directives?: $ReadOnlyArray<DirectiveNode>,
498
- +types?: $ReadOnlyArray<NamedTypeNode>,
499
- };
500
-
501
- export type EnumTypeDefinitionNode = {
502
- +kind: 'EnumTypeDefinition',
503
- +loc?: Location,
504
- +description?: StringValueNode,
505
- +name: NameNode,
506
- +directives?: $ReadOnlyArray<DirectiveNode>,
507
- +values?: $ReadOnlyArray<EnumValueDefinitionNode>,
508
- };
509
-
510
- export type EnumValueDefinitionNode = {
511
- +kind: 'EnumValueDefinition',
512
- +loc?: Location,
513
- +description?: StringValueNode,
514
- +name: NameNode,
515
- +directives?: $ReadOnlyArray<DirectiveNode>,
516
- };
517
-
518
- export type InputObjectTypeDefinitionNode = {
519
- +kind: 'InputObjectTypeDefinition',
520
- +loc?: Location,
521
- +description?: StringValueNode,
522
- +name: NameNode,
523
- +directives?: $ReadOnlyArray<DirectiveNode>,
524
- +fields?: $ReadOnlyArray<InputValueDefinitionNode>,
525
- };
526
-
527
- // Type Extensions
528
-
529
- export type TypeExtensionNode =
530
- | ScalarTypeExtensionNode
531
- | ObjectTypeExtensionNode
532
- | InterfaceTypeExtensionNode
533
- | UnionTypeExtensionNode
534
- | EnumTypeExtensionNode
535
- | InputObjectTypeExtensionNode;
536
-
537
- export type ScalarTypeExtensionNode = {
538
- +kind: 'ScalarTypeExtension',
539
- +loc?: Location,
540
- +name: NameNode,
541
- +directives?: $ReadOnlyArray<DirectiveNode>,
542
- };
543
-
544
- export type ObjectTypeExtensionNode = {
545
- +kind: 'ObjectTypeExtension',
546
- +loc?: Location,
547
- +name: NameNode,
548
- +interfaces?: $ReadOnlyArray<NamedTypeNode>,
549
- +directives?: $ReadOnlyArray<DirectiveNode>,
550
- +fields?: $ReadOnlyArray<FieldDefinitionNode>,
551
- };
552
-
553
- export type InterfaceTypeExtensionNode = {
554
- +kind: 'InterfaceTypeExtension',
555
- +loc?: Location,
556
- +name: NameNode,
557
- +directives?: $ReadOnlyArray<DirectiveNode>,
558
- +fields?: $ReadOnlyArray<FieldDefinitionNode>,
559
- };
560
-
561
- export type UnionTypeExtensionNode = {
562
- +kind: 'UnionTypeExtension',
563
- +loc?: Location,
564
- +name: NameNode,
565
- +directives?: $ReadOnlyArray<DirectiveNode>,
566
- +types?: $ReadOnlyArray<NamedTypeNode>,
567
- };
568
-
569
- export type EnumTypeExtensionNode = {
570
- +kind: 'EnumTypeExtension',
571
- +loc?: Location,
572
- +name: NameNode,
573
- +directives?: $ReadOnlyArray<DirectiveNode>,
574
- +values?: $ReadOnlyArray<EnumValueDefinitionNode>,
575
- };
576
-
577
- export type InputObjectTypeExtensionNode = {
578
- +kind: 'InputObjectTypeExtension',
579
- +loc?: Location,
580
- +name: NameNode,
581
- +directives?: $ReadOnlyArray<DirectiveNode>,
582
- +fields?: $ReadOnlyArray<InputValueDefinitionNode>,
583
- };
584
-
585
- // Directive Definitions
586
-
587
- export type DirectiveDefinitionNode = {
588
- +kind: 'DirectiveDefinition',
589
- +loc?: Location,
590
- +description?: StringValueNode,
591
- +name: NameNode,
592
- +arguments?: $ReadOnlyArray<InputValueDefinitionNode>,
593
- +locations: $ReadOnlyArray<NameNode>,
594
- };