graphql 15.1.0 → 15.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +10 -12
  3. package/error/GraphQLError.js +5 -5
  4. package/error/GraphQLError.js.flow +5 -5
  5. package/error/GraphQLError.mjs +1 -1
  6. package/error/formatError.js +1 -1
  7. package/error/formatError.js.flow +2 -3
  8. package/error/index.js +4 -4
  9. package/error/index.js.flow +0 -1
  10. package/error/locatedError.d.ts +2 -2
  11. package/error/locatedError.js +10 -5
  12. package/error/locatedError.js.flow +11 -5
  13. package/error/locatedError.mjs +6 -4
  14. package/error/syntaxError.js +1 -1
  15. package/error/syntaxError.js.flow +1 -2
  16. package/execution/execute.d.ts +24 -16
  17. package/execution/execute.js +123 -105
  18. package/execution/execute.js.flow +169 -153
  19. package/execution/execute.mjs +101 -82
  20. package/execution/index.d.ts +2 -0
  21. package/execution/index.js +9 -3
  22. package/execution/index.js.flow +12 -3
  23. package/execution/index.mjs +1 -1
  24. package/execution/values.js +11 -11
  25. package/execution/values.js.flow +10 -14
  26. package/graphql.js +5 -5
  27. package/graphql.js.flow +9 -9
  28. package/index.d.ts +19 -1
  29. package/index.js +27 -9
  30. package/index.js.flow +10 -3
  31. package/index.mjs +4 -3
  32. package/jsutils/ObjMap.js.flow +0 -1
  33. package/jsutils/Path.d.ts +6 -1
  34. package/jsutils/Path.js +3 -2
  35. package/jsutils/Path.js.flow +3 -2
  36. package/jsutils/Path.mjs +3 -2
  37. package/jsutils/PromiseOrValue.js.flow +0 -1
  38. package/jsutils/defineInspect.js +2 -2
  39. package/jsutils/defineInspect.js.flow +0 -1
  40. package/jsutils/devAssert.js.flow +0 -1
  41. package/jsutils/didYouMean.js.flow +0 -1
  42. package/jsutils/identityFunc.js.flow +0 -1
  43. package/jsutils/inspect.js +1 -2
  44. package/jsutils/inspect.js.flow +10 -8
  45. package/jsutils/inspect.mjs +1 -1
  46. package/jsutils/instanceOf.js.flow +2 -3
  47. package/jsutils/invariant.js.flow +0 -1
  48. package/jsutils/isAsyncIterable.js +19 -0
  49. package/jsutils/isAsyncIterable.js.flow +18 -0
  50. package/jsutils/isAsyncIterable.mjs +16 -0
  51. package/jsutils/isCollection.js +1 -1
  52. package/jsutils/isCollection.js.flow +0 -1
  53. package/jsutils/isObjectLike.js.flow +0 -1
  54. package/jsutils/isPromise.js.flow +0 -1
  55. package/jsutils/keyMap.js.flow +1 -2
  56. package/jsutils/keyValMap.js.flow +1 -2
  57. package/jsutils/mapValue.js +1 -1
  58. package/jsutils/mapValue.js.flow +1 -2
  59. package/jsutils/memoize3.js +2 -5
  60. package/jsutils/memoize3.js.flow +2 -5
  61. package/jsutils/memoize3.mjs +2 -5
  62. package/jsutils/nodejsCustomInspectSymbol.js.flow +0 -1
  63. package/jsutils/printPathArray.js.flow +0 -1
  64. package/jsutils/promiseForObject.js.flow +1 -2
  65. package/jsutils/promiseReduce.js +1 -1
  66. package/jsutils/promiseReduce.js.flow +1 -1
  67. package/jsutils/promiseReduce.mjs +1 -1
  68. package/jsutils/suggestionList.js.flow +1 -2
  69. package/jsutils/toObjMap.js +1 -1
  70. package/jsutils/toObjMap.js.flow +5 -6
  71. package/language/ast.js +1 -1
  72. package/language/ast.js.flow +2 -3
  73. package/language/blockString.d.ts +1 -1
  74. package/language/blockString.js +53 -32
  75. package/language/blockString.js.flow +49 -34
  76. package/language/blockString.mjs +54 -33
  77. package/language/directiveLocation.js.flow +0 -1
  78. package/language/experimentalOnlineParser/grammar.d.ts +1006 -0
  79. package/language/experimentalOnlineParser/grammar.js +987 -0
  80. package/language/experimentalOnlineParser/grammar.js.flow +1000 -0
  81. package/language/experimentalOnlineParser/grammar.mjs +980 -0
  82. package/language/experimentalOnlineParser/index.d.ts +6 -0
  83. package/language/experimentalOnlineParser/index.js +31 -0
  84. package/language/experimentalOnlineParser/index.js.flow +7 -0
  85. package/language/experimentalOnlineParser/index.mjs +1 -0
  86. package/language/experimentalOnlineParser/onlineParser.d.ts +125 -0
  87. package/language/experimentalOnlineParser/onlineParser.js +604 -0
  88. package/language/experimentalOnlineParser/onlineParser.js.flow +723 -0
  89. package/language/experimentalOnlineParser/onlineParser.mjs +587 -0
  90. package/language/index.js +12 -12
  91. package/language/index.js.flow +0 -1
  92. package/language/kinds.js.flow +0 -1
  93. package/language/lexer.js +242 -183
  94. package/language/lexer.js.flow +191 -186
  95. package/language/lexer.mjs +239 -180
  96. package/language/location.js.flow +1 -2
  97. package/language/parser.js +73 -68
  98. package/language/parser.js.flow +112 -106
  99. package/language/parser.mjs +66 -62
  100. package/language/predicates.js +1 -1
  101. package/language/predicates.js.flow +1 -2
  102. package/language/printLocation.js +1 -1
  103. package/language/printLocation.js.flow +4 -4
  104. package/language/printer.js +20 -13
  105. package/language/printer.js.flow +27 -25
  106. package/language/printer.mjs +18 -11
  107. package/language/source.d.ts +12 -6
  108. package/language/source.js +25 -9
  109. package/language/source.js.flow +25 -8
  110. package/language/source.mjs +19 -7
  111. package/language/tokenKind.js.flow +0 -1
  112. package/language/visitor.d.ts +3 -3
  113. package/language/visitor.js +5 -5
  114. package/language/visitor.js.flow +5 -5
  115. package/language/visitor.mjs +3 -3
  116. package/package.json +1 -1
  117. package/polyfills/arrayFrom.js +2 -2
  118. package/polyfills/arrayFrom.js.flow +1 -2
  119. package/polyfills/arrayFrom.mjs +1 -1
  120. package/polyfills/find.js +1 -1
  121. package/polyfills/find.js.flow +1 -2
  122. package/polyfills/find.mjs +1 -1
  123. package/polyfills/isFinite.js +1 -1
  124. package/polyfills/isFinite.js.flow +1 -2
  125. package/polyfills/isFinite.mjs +1 -1
  126. package/polyfills/isInteger.js +1 -1
  127. package/polyfills/isInteger.js.flow +1 -2
  128. package/polyfills/isInteger.mjs +1 -1
  129. package/polyfills/objectEntries.js +1 -1
  130. package/polyfills/objectEntries.js.flow +2 -3
  131. package/polyfills/objectEntries.mjs +1 -1
  132. package/polyfills/objectValues.js +1 -1
  133. package/polyfills/objectValues.js.flow +2 -3
  134. package/polyfills/objectValues.mjs +1 -1
  135. package/polyfills/symbols.js +3 -5
  136. package/polyfills/symbols.js.flow +9 -6
  137. package/polyfills/symbols.mjs +3 -5
  138. package/subscription/index.js +1 -1
  139. package/subscription/index.js.flow +0 -1
  140. package/subscription/mapAsyncIterator.js +2 -2
  141. package/subscription/mapAsyncIterator.js.flow +9 -10
  142. package/subscription/mapAsyncIterator.mjs +1 -1
  143. package/subscription/subscribe.js +61 -73
  144. package/subscription/subscribe.js.flow +74 -88
  145. package/subscription/subscribe.mjs +53 -65
  146. package/type/definition.d.ts +181 -31
  147. package/type/definition.js +37 -32
  148. package/type/definition.js.flow +66 -51
  149. package/type/definition.mjs +20 -18
  150. package/type/directives.d.ts +17 -3
  151. package/type/directives.js +17 -16
  152. package/type/directives.js.flow +20 -21
  153. package/type/directives.mjs +6 -5
  154. package/type/index.d.ts +12 -0
  155. package/type/index.js +6 -6
  156. package/type/index.js.flow +0 -1
  157. package/type/introspection.js +86 -68
  158. package/type/introspection.js.flow +85 -54
  159. package/type/introspection.mjs +79 -61
  160. package/type/scalars.js +9 -9
  161. package/type/scalars.js.flow +3 -3
  162. package/type/scalars.mjs +1 -1
  163. package/type/schema.d.ts +17 -4
  164. package/type/schema.js +13 -13
  165. package/type/schema.js.flow +18 -16
  166. package/type/schema.mjs +1 -1
  167. package/type/validate.js +52 -19
  168. package/type/validate.js.flow +67 -18
  169. package/type/validate.mjs +44 -10
  170. package/utilities/TypeInfo.js +7 -7
  171. package/utilities/TypeInfo.js.flow +16 -18
  172. package/utilities/TypeInfo.mjs +1 -1
  173. package/utilities/assertValidName.js +2 -2
  174. package/utilities/assertValidName.js.flow +0 -1
  175. package/utilities/astFromValue.js +10 -10
  176. package/utilities/astFromValue.js.flow +2 -3
  177. package/utilities/buildASTSchema.js +17 -27
  178. package/utilities/buildASTSchema.js.flow +11 -28
  179. package/utilities/buildASTSchema.mjs +11 -21
  180. package/utilities/buildClientSchema.js +14 -14
  181. package/utilities/buildClientSchema.js.flow +41 -29
  182. package/utilities/buildClientSchema.mjs +5 -5
  183. package/utilities/coerceInputValue.js +14 -14
  184. package/utilities/coerceInputValue.js.flow +7 -6
  185. package/utilities/coerceInputValue.mjs +2 -2
  186. package/utilities/concatAST.js +9 -8
  187. package/utilities/concatAST.js.flow +9 -9
  188. package/utilities/concatAST.mjs +9 -6
  189. package/utilities/extendSchema.js +26 -19
  190. package/utilities/extendSchema.js.flow +58 -45
  191. package/utilities/extendSchema.mjs +9 -2
  192. package/utilities/findBreakingChanges.js +9 -9
  193. package/utilities/findBreakingChanges.js.flow +12 -11
  194. package/utilities/findDeprecatedUsages.d.ts +9 -1
  195. package/utilities/findDeprecatedUsages.js +11 -27
  196. package/utilities/findDeprecatedUsages.js.flow +15 -44
  197. package/utilities/findDeprecatedUsages.mjs +11 -25
  198. package/utilities/getIntrospectionQuery.js.flow +2 -3
  199. package/utilities/getOperationAST.js +1 -1
  200. package/utilities/getOperationAST.js.flow +1 -5
  201. package/utilities/getOperationAST.mjs +1 -1
  202. package/utilities/getOperationRootType.js +1 -1
  203. package/utilities/getOperationRootType.js.flow +5 -6
  204. package/utilities/index.d.ts +4 -1
  205. package/utilities/index.js +22 -22
  206. package/utilities/index.js.flow +1 -2
  207. package/utilities/index.mjs +1 -1
  208. package/utilities/introspectionFromSchema.js +6 -8
  209. package/utilities/introspectionFromSchema.js.flow +10 -10
  210. package/utilities/introspectionFromSchema.mjs +3 -4
  211. package/utilities/lexicographicSortSchema.js +10 -8
  212. package/utilities/lexicographicSortSchema.js.flow +19 -12
  213. package/utilities/lexicographicSortSchema.mjs +3 -1
  214. package/utilities/printSchema.js +15 -16
  215. package/utilities/printSchema.js.flow +34 -25
  216. package/utilities/printSchema.mjs +6 -7
  217. package/utilities/separateOperations.js +2 -2
  218. package/utilities/separateOperations.js.flow +2 -6
  219. package/utilities/separateOperations.mjs +1 -1
  220. package/utilities/stripIgnoredCharacters.js +6 -16
  221. package/utilities/stripIgnoredCharacters.js.flow +4 -13
  222. package/utilities/stripIgnoredCharacters.mjs +3 -10
  223. package/utilities/typeComparators.js +1 -1
  224. package/utilities/typeComparators.js.flow +2 -4
  225. package/utilities/typeFromAST.js +6 -6
  226. package/utilities/typeFromAST.js.flow +11 -14
  227. package/utilities/typeFromAST.mjs +2 -2
  228. package/utilities/typedQueryDocumentNode.d.ts +20 -0
  229. package/utilities/valueFromAST.js +6 -6
  230. package/utilities/valueFromAST.js.flow +7 -5
  231. package/utilities/valueFromASTUntyped.js +4 -4
  232. package/utilities/valueFromASTUntyped.js.flow +2 -3
  233. package/validation/ValidationContext.d.ts +3 -0
  234. package/validation/ValidationContext.js +7 -3
  235. package/validation/ValidationContext.js.flow +28 -22
  236. package/validation/ValidationContext.mjs +4 -0
  237. package/validation/index.d.ts +4 -0
  238. package/validation/index.js +52 -36
  239. package/validation/index.js.flow +4 -1
  240. package/validation/index.mjs +4 -1
  241. package/validation/rules/ExecutableDefinitions.js +1 -1
  242. package/validation/rules/ExecutableDefinitions.js.flow +0 -1
  243. package/validation/rules/ExecutableDefinitionsRule.js +3 -3
  244. package/validation/rules/ExecutableDefinitionsRule.js.flow +2 -3
  245. package/validation/rules/FieldsOnCorrectTypeRule.js +5 -5
  246. package/validation/rules/FieldsOnCorrectTypeRule.js.flow +9 -8
  247. package/validation/rules/FragmentsOnCompositeTypesRule.js +4 -4
  248. package/validation/rules/FragmentsOnCompositeTypesRule.js.flow +2 -3
  249. package/validation/rules/KnownArgumentNamesRule.js +5 -5
  250. package/validation/rules/KnownArgumentNamesRule.js.flow +5 -5
  251. package/validation/rules/KnownDirectivesRule.js +6 -6
  252. package/validation/rules/KnownDirectivesRule.js.flow +10 -11
  253. package/validation/rules/KnownFragmentNamesRule.js +1 -1
  254. package/validation/rules/KnownFragmentNamesRule.js.flow +3 -3
  255. package/validation/rules/KnownTypeNamesRule.js +12 -10
  256. package/validation/rules/KnownTypeNamesRule.js.flow +14 -11
  257. package/validation/rules/KnownTypeNamesRule.mjs +6 -5
  258. package/validation/rules/LoneAnonymousOperationRule.js +2 -2
  259. package/validation/rules/LoneAnonymousOperationRule.js.flow +2 -3
  260. package/validation/rules/LoneSchemaDefinition.js +1 -1
  261. package/validation/rules/LoneSchemaDefinition.js.flow +0 -1
  262. package/validation/rules/LoneSchemaDefinitionRule.js +1 -1
  263. package/validation/rules/LoneSchemaDefinitionRule.js.flow +2 -3
  264. package/validation/rules/NoFragmentCyclesRule.js +1 -1
  265. package/validation/rules/NoFragmentCyclesRule.js.flow +4 -5
  266. package/validation/rules/NoUndefinedVariablesRule.js +1 -1
  267. package/validation/rules/NoUndefinedVariablesRule.js.flow +3 -3
  268. package/validation/rules/NoUnusedFragmentsRule.js +1 -1
  269. package/validation/rules/NoUnusedFragmentsRule.js.flow +3 -3
  270. package/validation/rules/NoUnusedVariablesRule.js +1 -1
  271. package/validation/rules/NoUnusedVariablesRule.js.flow +3 -3
  272. package/validation/rules/OverlappingFieldsCanBeMergedRule.js +20 -20
  273. package/validation/rules/OverlappingFieldsCanBeMergedRule.js.flow +29 -27
  274. package/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +12 -12
  275. package/validation/rules/PossibleFragmentSpreadsRule.js +5 -5
  276. package/validation/rules/PossibleFragmentSpreadsRule.js.flow +7 -4
  277. package/validation/rules/PossibleTypeExtensions.js +1 -1
  278. package/validation/rules/PossibleTypeExtensions.js.flow +0 -1
  279. package/validation/rules/PossibleTypeExtensionsRule.js +8 -8
  280. package/validation/rules/PossibleTypeExtensionsRule.js.flow +8 -6
  281. package/validation/rules/ProvidedRequiredArgumentsRule.js +7 -7
  282. package/validation/rules/ProvidedRequiredArgumentsRule.js.flow +7 -6
  283. package/validation/rules/ScalarLeafsRule.js +3 -3
  284. package/validation/rules/ScalarLeafsRule.js.flow +3 -4
  285. package/validation/rules/SingleFieldSubscriptionsRule.js +1 -1
  286. package/validation/rules/SingleFieldSubscriptionsRule.js.flow +3 -4
  287. package/validation/rules/UniqueArgumentNamesRule.js +1 -1
  288. package/validation/rules/UniqueArgumentNamesRule.js.flow +2 -3
  289. package/validation/rules/UniqueDirectiveNames.js +1 -1
  290. package/validation/rules/UniqueDirectiveNames.js.flow +0 -1
  291. package/validation/rules/UniqueDirectiveNamesRule.js +1 -1
  292. package/validation/rules/UniqueDirectiveNamesRule.js.flow +2 -3
  293. package/validation/rules/UniqueDirectivesPerLocationRule.js +4 -4
  294. package/validation/rules/UniqueDirectivesPerLocationRule.js.flow +4 -5
  295. package/validation/rules/UniqueEnumValueNames.js +1 -1
  296. package/validation/rules/UniqueEnumValueNames.js.flow +0 -1
  297. package/validation/rules/UniqueEnumValueNamesRule.js +2 -2
  298. package/validation/rules/UniqueEnumValueNamesRule.js.flow +11 -4
  299. package/validation/rules/UniqueFieldDefinitionNames.js +1 -1
  300. package/validation/rules/UniqueFieldDefinitionNames.js.flow +0 -1
  301. package/validation/rules/UniqueFieldDefinitionNamesRule.js +3 -3
  302. package/validation/rules/UniqueFieldDefinitionNamesRule.js.flow +17 -6
  303. package/validation/rules/UniqueFieldDefinitionNamesRule.mjs +1 -1
  304. package/validation/rules/UniqueFragmentNamesRule.js +1 -1
  305. package/validation/rules/UniqueFragmentNamesRule.js.flow +3 -3
  306. package/validation/rules/UniqueInputFieldNamesRule.js +1 -1
  307. package/validation/rules/UniqueInputFieldNamesRule.js.flow +3 -3
  308. package/validation/rules/UniqueOperationNamesRule.js +1 -1
  309. package/validation/rules/UniqueOperationNamesRule.js.flow +3 -3
  310. package/validation/rules/UniqueOperationTypes.js +1 -1
  311. package/validation/rules/UniqueOperationTypes.js.flow +0 -1
  312. package/validation/rules/UniqueOperationTypesRule.js +1 -1
  313. package/validation/rules/UniqueOperationTypesRule.js.flow +10 -4
  314. package/validation/rules/UniqueTypeNames.js +1 -1
  315. package/validation/rules/UniqueTypeNames.js.flow +0 -1
  316. package/validation/rules/UniqueTypeNamesRule.js +1 -1
  317. package/validation/rules/UniqueTypeNamesRule.js.flow +3 -4
  318. package/validation/rules/UniqueVariableNamesRule.js +1 -1
  319. package/validation/rules/UniqueVariableNamesRule.js.flow +3 -4
  320. package/validation/rules/ValuesOfCorrectTypeRule.js +8 -8
  321. package/validation/rules/ValuesOfCorrectTypeRule.js.flow +3 -4
  322. package/validation/rules/VariablesAreInputTypesRule.js +4 -4
  323. package/validation/rules/VariablesAreInputTypesRule.js.flow +3 -4
  324. package/validation/rules/VariablesInAllowedPositionRule.js +6 -6
  325. package/validation/rules/VariablesInAllowedPositionRule.js.flow +6 -6
  326. package/validation/rules/custom/NoDeprecatedCustomRule.d.ts +14 -0
  327. package/validation/rules/custom/NoDeprecatedCustomRule.js +79 -0
  328. package/validation/rules/custom/NoDeprecatedCustomRule.js.flow +94 -0
  329. package/validation/rules/custom/NoDeprecatedCustomRule.mjs +68 -0
  330. package/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts +16 -0
  331. package/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +34 -0
  332. package/validation/rules/custom/NoSchemaIntrospectionCustomRule.js.flow +38 -0
  333. package/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs +25 -0
  334. package/validation/specifiedRules.js +33 -33
  335. package/validation/specifiedRules.js.flow +0 -1
  336. package/validation/validate.js +7 -7
  337. package/validation/validate.js.flow +4 -9
  338. package/version.js +2 -2
  339. package/version.js.flow +2 -3
  340. package/version.mjs +2 -2
  341. package/polyfills/flatMap.js +0 -30
  342. package/polyfills/flatMap.js.flow +0 -28
  343. package/polyfills/flatMap.mjs +0 -23
@@ -1,8 +1,4 @@
1
1
  // @flow strict
2
-
3
- // FIXME
4
- /* eslint-disable import/no-cycle */
5
-
6
2
  import objectValues from '../polyfills/objectValues';
7
3
 
8
4
  import inspect from '../jsutils/inspect';
@@ -12,20 +8,22 @@ import { print } from '../language/printer';
12
8
  import { DirectiveLocation } from '../language/directiveLocation';
13
9
  import { astFromValue } from '../utilities/astFromValue';
14
10
 
15
- import { type GraphQLSchema } from './schema';
16
- import { type GraphQLDirective } from './directives';
11
+ import type { GraphQLSchema } from './schema';
12
+ import type { GraphQLDirective } from './directives';
13
+ import type {
14
+ GraphQLType,
15
+ GraphQLNamedType,
16
+ GraphQLInputField,
17
+ GraphQLEnumValue,
18
+ GraphQLField,
19
+ GraphQLFieldConfigMap,
20
+ } from './definition';
17
21
  import { GraphQLString, GraphQLBoolean } from './scalars';
18
22
  import {
19
- type GraphQLType,
20
- type GraphQLNamedType,
21
- type GraphQLInputField,
22
- type GraphQLEnumValue,
23
- type GraphQLField,
24
- type GraphQLFieldConfigMap,
25
- GraphQLObjectType,
26
- GraphQLEnumType,
27
23
  GraphQLList,
28
24
  GraphQLNonNull,
25
+ GraphQLObjectType,
26
+ GraphQLEnumType,
29
27
  isScalarType,
30
28
  isObjectType,
31
29
  isInterfaceType,
@@ -49,14 +47,14 @@ export const __Schema = new GraphQLObjectType({
49
47
  },
50
48
  types: {
51
49
  description: 'A list of all types supported by this server.',
52
- type: GraphQLNonNull(GraphQLList(GraphQLNonNull(__Type))),
50
+ type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))),
53
51
  resolve(schema) {
54
52
  return objectValues(schema.getTypeMap());
55
53
  },
56
54
  },
57
55
  queryType: {
58
56
  description: 'The type that query operations will be rooted at.',
59
- type: GraphQLNonNull(__Type),
57
+ type: new GraphQLNonNull(__Type),
60
58
  resolve: (schema) => schema.getQueryType(),
61
59
  },
62
60
  mutationType: {
@@ -73,7 +71,9 @@ export const __Schema = new GraphQLObjectType({
73
71
  },
74
72
  directives: {
75
73
  description: 'A list of all directives supported by this server.',
76
- type: GraphQLNonNull(GraphQLList(GraphQLNonNull(__Directive))),
74
+ type: new GraphQLNonNull(
75
+ new GraphQLList(new GraphQLNonNull(__Directive)),
76
+ ),
77
77
  resolve: (schema) => schema.getDirectives(),
78
78
  },
79
79
  }: GraphQLFieldConfigMap<GraphQLSchema, mixed>),
@@ -86,7 +86,7 @@ export const __Directive = new GraphQLObjectType({
86
86
  fields: () =>
87
87
  ({
88
88
  name: {
89
- type: GraphQLNonNull(GraphQLString),
89
+ type: new GraphQLNonNull(GraphQLString),
90
90
  resolve: (directive) => directive.name,
91
91
  },
92
92
  description: {
@@ -94,15 +94,19 @@ export const __Directive = new GraphQLObjectType({
94
94
  resolve: (directive) => directive.description,
95
95
  },
96
96
  isRepeatable: {
97
- type: GraphQLNonNull(GraphQLBoolean),
97
+ type: new GraphQLNonNull(GraphQLBoolean),
98
98
  resolve: (directive) => directive.isRepeatable,
99
99
  },
100
100
  locations: {
101
- type: GraphQLNonNull(GraphQLList(GraphQLNonNull(__DirectiveLocation))),
101
+ type: new GraphQLNonNull(
102
+ new GraphQLList(new GraphQLNonNull(__DirectiveLocation)),
103
+ ),
102
104
  resolve: (directive) => directive.locations,
103
105
  },
104
106
  args: {
105
- type: GraphQLNonNull(GraphQLList(GraphQLNonNull(__InputValue))),
107
+ type: new GraphQLNonNull(
108
+ new GraphQLList(new GraphQLNonNull(__InputValue)),
109
+ ),
106
110
  resolve: (directive) => directive.args,
107
111
  },
108
112
  }: GraphQLFieldConfigMap<GraphQLDirective, mixed>),
@@ -199,7 +203,7 @@ export const __Type = new GraphQLObjectType({
199
203
  fields: () =>
200
204
  ({
201
205
  kind: {
202
- type: GraphQLNonNull(__TypeKind),
206
+ type: new GraphQLNonNull(__TypeKind),
203
207
  resolve(type) {
204
208
  if (isScalarType(type)) {
205
209
  return TypeKind.SCALAR;
@@ -246,23 +250,21 @@ export const __Type = new GraphQLObjectType({
246
250
  obj.specifiedByUrl !== undefined ? obj.specifiedByUrl : undefined,
247
251
  },
248
252
  fields: {
249
- type: GraphQLList(GraphQLNonNull(__Field)),
253
+ type: new GraphQLList(new GraphQLNonNull(__Field)),
250
254
  args: {
251
255
  includeDeprecated: { type: GraphQLBoolean, defaultValue: false },
252
256
  },
253
257
  resolve(type, { includeDeprecated }) {
254
258
  if (isObjectType(type) || isInterfaceType(type)) {
255
- let fields = objectValues(type.getFields());
256
- if (!includeDeprecated) {
257
- fields = fields.filter((field) => !field.isDeprecated);
258
- }
259
- return fields;
259
+ const fields = objectValues(type.getFields());
260
+ return includeDeprecated
261
+ ? fields
262
+ : fields.filter((field) => field.deprecationReason == null);
260
263
  }
261
- return null;
262
264
  },
263
265
  },
264
266
  interfaces: {
265
- type: GraphQLList(GraphQLNonNull(__Type)),
267
+ type: new GraphQLList(new GraphQLNonNull(__Type)),
266
268
  resolve(type) {
267
269
  if (isObjectType(type) || isInterfaceType(type)) {
268
270
  return type.getInterfaces();
@@ -270,7 +272,7 @@ export const __Type = new GraphQLObjectType({
270
272
  },
271
273
  },
272
274
  possibleTypes: {
273
- type: GraphQLList(GraphQLNonNull(__Type)),
275
+ type: new GraphQLList(new GraphQLNonNull(__Type)),
274
276
  resolve(type, _args, _context, { schema }) {
275
277
  if (isAbstractType(type)) {
276
278
  return schema.getPossibleTypes(type);
@@ -278,25 +280,33 @@ export const __Type = new GraphQLObjectType({
278
280
  },
279
281
  },
280
282
  enumValues: {
281
- type: GraphQLList(GraphQLNonNull(__EnumValue)),
283
+ type: new GraphQLList(new GraphQLNonNull(__EnumValue)),
282
284
  args: {
283
285
  includeDeprecated: { type: GraphQLBoolean, defaultValue: false },
284
286
  },
285
287
  resolve(type, { includeDeprecated }) {
286
288
  if (isEnumType(type)) {
287
- let values = type.getValues();
288
- if (!includeDeprecated) {
289
- values = values.filter((value) => !value.isDeprecated);
290
- }
291
- return values;
289
+ const values = type.getValues();
290
+ return includeDeprecated
291
+ ? values
292
+ : values.filter((field) => field.deprecationReason == null);
292
293
  }
293
294
  },
294
295
  },
295
296
  inputFields: {
296
- type: GraphQLList(GraphQLNonNull(__InputValue)),
297
- resolve(type) {
297
+ type: new GraphQLList(new GraphQLNonNull(__InputValue)),
298
+ args: {
299
+ includeDeprecated: {
300
+ type: GraphQLBoolean,
301
+ defaultValue: false,
302
+ },
303
+ },
304
+ resolve(type, { includeDeprecated }) {
298
305
  if (isInputObjectType(type)) {
299
- return objectValues(type.getFields());
306
+ const values = objectValues(type.getFields());
307
+ return includeDeprecated
308
+ ? values
309
+ : values.filter((field) => field.deprecationReason == null);
300
310
  }
301
311
  },
302
312
  },
@@ -315,7 +325,7 @@ export const __Field = new GraphQLObjectType({
315
325
  fields: () =>
316
326
  ({
317
327
  name: {
318
- type: GraphQLNonNull(GraphQLString),
328
+ type: new GraphQLNonNull(GraphQLString),
319
329
  resolve: (field) => field.name,
320
330
  },
321
331
  description: {
@@ -323,16 +333,28 @@ export const __Field = new GraphQLObjectType({
323
333
  resolve: (field) => field.description,
324
334
  },
325
335
  args: {
326
- type: GraphQLNonNull(GraphQLList(GraphQLNonNull(__InputValue))),
327
- resolve: (field) => field.args,
336
+ type: new GraphQLNonNull(
337
+ new GraphQLList(new GraphQLNonNull(__InputValue)),
338
+ ),
339
+ args: {
340
+ includeDeprecated: {
341
+ type: GraphQLBoolean,
342
+ defaultValue: false,
343
+ },
344
+ },
345
+ resolve(field, { includeDeprecated }) {
346
+ return includeDeprecated
347
+ ? field.args
348
+ : field.args.filter((arg) => arg.deprecationReason == null);
349
+ },
328
350
  },
329
351
  type: {
330
- type: GraphQLNonNull(__Type),
352
+ type: new GraphQLNonNull(__Type),
331
353
  resolve: (field) => field.type,
332
354
  },
333
355
  isDeprecated: {
334
- type: GraphQLNonNull(GraphQLBoolean),
335
- resolve: (field) => field.isDeprecated,
356
+ type: new GraphQLNonNull(GraphQLBoolean),
357
+ resolve: (field) => field.deprecationReason != null,
336
358
  },
337
359
  deprecationReason: {
338
360
  type: GraphQLString,
@@ -348,7 +370,7 @@ export const __InputValue = new GraphQLObjectType({
348
370
  fields: () =>
349
371
  ({
350
372
  name: {
351
- type: GraphQLNonNull(GraphQLString),
373
+ type: new GraphQLNonNull(GraphQLString),
352
374
  resolve: (inputValue) => inputValue.name,
353
375
  },
354
376
  description: {
@@ -356,7 +378,7 @@ export const __InputValue = new GraphQLObjectType({
356
378
  resolve: (inputValue) => inputValue.description,
357
379
  },
358
380
  type: {
359
- type: GraphQLNonNull(__Type),
381
+ type: new GraphQLNonNull(__Type),
360
382
  resolve: (inputValue) => inputValue.type,
361
383
  },
362
384
  defaultValue: {
@@ -369,6 +391,14 @@ export const __InputValue = new GraphQLObjectType({
369
391
  return valueAST ? print(valueAST) : null;
370
392
  },
371
393
  },
394
+ isDeprecated: {
395
+ type: new GraphQLNonNull(GraphQLBoolean),
396
+ resolve: (field) => field.deprecationReason != null,
397
+ },
398
+ deprecationReason: {
399
+ type: GraphQLString,
400
+ resolve: (obj) => obj.deprecationReason,
401
+ },
372
402
  }: GraphQLFieldConfigMap<GraphQLInputField, mixed>),
373
403
  });
374
404
 
@@ -379,7 +409,7 @@ export const __EnumValue = new GraphQLObjectType({
379
409
  fields: () =>
380
410
  ({
381
411
  name: {
382
- type: GraphQLNonNull(GraphQLString),
412
+ type: new GraphQLNonNull(GraphQLString),
383
413
  resolve: (enumValue) => enumValue.name,
384
414
  },
385
415
  description: {
@@ -387,8 +417,8 @@ export const __EnumValue = new GraphQLObjectType({
387
417
  resolve: (enumValue) => enumValue.description,
388
418
  },
389
419
  isDeprecated: {
390
- type: GraphQLNonNull(GraphQLBoolean),
391
- resolve: (enumValue) => enumValue.isDeprecated,
420
+ type: new GraphQLNonNull(GraphQLBoolean),
421
+ resolve: (enumValue) => enumValue.deprecationReason != null,
392
422
  },
393
423
  deprecationReason: {
394
424
  type: GraphQLString,
@@ -460,7 +490,7 @@ export const __TypeKind = new GraphQLEnumType({
460
490
 
461
491
  export const SchemaMetaFieldDef: GraphQLField<mixed, mixed> = {
462
492
  name: '__schema',
463
- type: GraphQLNonNull(__Schema),
493
+ type: new GraphQLNonNull(__Schema),
464
494
  description: 'Access the current type schema of this server.',
465
495
  args: [],
466
496
  resolve: (_source, _args, _context, { schema }) => schema,
@@ -478,8 +508,9 @@ export const TypeMetaFieldDef: GraphQLField<mixed, mixed> = {
478
508
  {
479
509
  name: 'name',
480
510
  description: undefined,
481
- type: GraphQLNonNull(GraphQLString),
511
+ type: new GraphQLNonNull(GraphQLString),
482
512
  defaultValue: undefined,
513
+ deprecationReason: undefined,
483
514
  extensions: undefined,
484
515
  astNode: undefined,
485
516
  },
@@ -493,7 +524,7 @@ export const TypeMetaFieldDef: GraphQLField<mixed, mixed> = {
493
524
 
494
525
  export const TypeNameMetaFieldDef: GraphQLField<mixed, mixed> = {
495
526
  name: '__typename',
496
- type: GraphQLNonNull(GraphQLString),
527
+ type: new GraphQLNonNull(GraphQLString),
497
528
  description: 'The name of the current Object type at runtime.',
498
529
  args: [],
499
530
  resolve: (_source, _args, _context, { parentType }) => parentType.name,
@@ -1,6 +1,3 @@
1
- // FIXME
2
-
3
- /* eslint-disable import/no-cycle */
4
1
  import objectValues from "../polyfills/objectValues.mjs";
5
2
  import inspect from "../jsutils/inspect.mjs";
6
3
  import invariant from "../jsutils/invariant.mjs";
@@ -8,7 +5,7 @@ import { print } from "../language/printer.mjs";
8
5
  import { DirectiveLocation } from "../language/directiveLocation.mjs";
9
6
  import { astFromValue } from "../utilities/astFromValue.mjs";
10
7
  import { GraphQLString, GraphQLBoolean } from "./scalars.mjs";
11
- import { GraphQLObjectType, GraphQLEnumType, GraphQLList, GraphQLNonNull, isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isListType, isNonNullType, isAbstractType } from "./definition.mjs";
8
+ import { GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLEnumType, isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isListType, isNonNullType, isAbstractType } from "./definition.mjs";
12
9
  export var __Schema = new GraphQLObjectType({
13
10
  name: '__Schema',
14
11
  description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.',
@@ -22,14 +19,14 @@ export var __Schema = new GraphQLObjectType({
22
19
  },
23
20
  types: {
24
21
  description: 'A list of all types supported by this server.',
25
- type: GraphQLNonNull(GraphQLList(GraphQLNonNull(__Type))),
22
+ type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))),
26
23
  resolve: function resolve(schema) {
27
24
  return objectValues(schema.getTypeMap());
28
25
  }
29
26
  },
30
27
  queryType: {
31
28
  description: 'The type that query operations will be rooted at.',
32
- type: GraphQLNonNull(__Type),
29
+ type: new GraphQLNonNull(__Type),
33
30
  resolve: function resolve(schema) {
34
31
  return schema.getQueryType();
35
32
  }
@@ -50,7 +47,7 @@ export var __Schema = new GraphQLObjectType({
50
47
  },
51
48
  directives: {
52
49
  description: 'A list of all directives supported by this server.',
53
- type: GraphQLNonNull(GraphQLList(GraphQLNonNull(__Directive))),
50
+ type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Directive))),
54
51
  resolve: function resolve(schema) {
55
52
  return schema.getDirectives();
56
53
  }
@@ -64,7 +61,7 @@ export var __Directive = new GraphQLObjectType({
64
61
  fields: function fields() {
65
62
  return {
66
63
  name: {
67
- type: GraphQLNonNull(GraphQLString),
64
+ type: new GraphQLNonNull(GraphQLString),
68
65
  resolve: function resolve(directive) {
69
66
  return directive.name;
70
67
  }
@@ -76,19 +73,19 @@ export var __Directive = new GraphQLObjectType({
76
73
  }
77
74
  },
78
75
  isRepeatable: {
79
- type: GraphQLNonNull(GraphQLBoolean),
76
+ type: new GraphQLNonNull(GraphQLBoolean),
80
77
  resolve: function resolve(directive) {
81
78
  return directive.isRepeatable;
82
79
  }
83
80
  },
84
81
  locations: {
85
- type: GraphQLNonNull(GraphQLList(GraphQLNonNull(__DirectiveLocation))),
82
+ type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__DirectiveLocation))),
86
83
  resolve: function resolve(directive) {
87
84
  return directive.locations;
88
85
  }
89
86
  },
90
87
  args: {
91
- type: GraphQLNonNull(GraphQLList(GraphQLNonNull(__InputValue))),
88
+ type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),
92
89
  resolve: function resolve(directive) {
93
90
  return directive.args;
94
91
  }
@@ -184,7 +181,7 @@ export var __Type = new GraphQLObjectType({
184
181
  fields: function fields() {
185
182
  return {
186
183
  kind: {
187
- type: GraphQLNonNull(__TypeKind),
184
+ type: new GraphQLNonNull(__TypeKind),
188
185
  resolve: function resolve(type) {
189
186
  if (isScalarType(type)) {
190
187
  return TypeKind.SCALAR;
@@ -242,7 +239,7 @@ export var __Type = new GraphQLObjectType({
242
239
  }
243
240
  },
244
241
  fields: {
245
- type: GraphQLList(GraphQLNonNull(__Field)),
242
+ type: new GraphQLList(new GraphQLNonNull(__Field)),
246
243
  args: {
247
244
  includeDeprecated: {
248
245
  type: GraphQLBoolean,
@@ -254,21 +251,14 @@ export var __Type = new GraphQLObjectType({
254
251
 
255
252
  if (isObjectType(type) || isInterfaceType(type)) {
256
253
  var fields = objectValues(type.getFields());
257
-
258
- if (!includeDeprecated) {
259
- fields = fields.filter(function (field) {
260
- return !field.isDeprecated;
261
- });
262
- }
263
-
264
- return fields;
254
+ return includeDeprecated ? fields : fields.filter(function (field) {
255
+ return field.deprecationReason == null;
256
+ });
265
257
  }
266
-
267
- return null;
268
258
  }
269
259
  },
270
260
  interfaces: {
271
- type: GraphQLList(GraphQLNonNull(__Type)),
261
+ type: new GraphQLList(new GraphQLNonNull(__Type)),
272
262
  resolve: function resolve(type) {
273
263
  if (isObjectType(type) || isInterfaceType(type)) {
274
264
  return type.getInterfaces();
@@ -276,7 +266,7 @@ export var __Type = new GraphQLObjectType({
276
266
  }
277
267
  },
278
268
  possibleTypes: {
279
- type: GraphQLList(GraphQLNonNull(__Type)),
269
+ type: new GraphQLList(new GraphQLNonNull(__Type)),
280
270
  resolve: function resolve(type, _args, _context, _ref2) {
281
271
  var schema = _ref2.schema;
282
272
 
@@ -286,7 +276,7 @@ export var __Type = new GraphQLObjectType({
286
276
  }
287
277
  },
288
278
  enumValues: {
289
- type: GraphQLList(GraphQLNonNull(__EnumValue)),
279
+ type: new GraphQLList(new GraphQLNonNull(__EnumValue)),
290
280
  args: {
291
281
  includeDeprecated: {
292
282
  type: GraphQLBoolean,
@@ -298,22 +288,28 @@ export var __Type = new GraphQLObjectType({
298
288
 
299
289
  if (isEnumType(type)) {
300
290
  var values = type.getValues();
301
-
302
- if (!includeDeprecated) {
303
- values = values.filter(function (value) {
304
- return !value.isDeprecated;
305
- });
306
- }
307
-
308
- return values;
291
+ return includeDeprecated ? values : values.filter(function (field) {
292
+ return field.deprecationReason == null;
293
+ });
309
294
  }
310
295
  }
311
296
  },
312
297
  inputFields: {
313
- type: GraphQLList(GraphQLNonNull(__InputValue)),
314
- resolve: function resolve(type) {
298
+ type: new GraphQLList(new GraphQLNonNull(__InputValue)),
299
+ args: {
300
+ includeDeprecated: {
301
+ type: GraphQLBoolean,
302
+ defaultValue: false
303
+ }
304
+ },
305
+ resolve: function resolve(type, _ref4) {
306
+ var includeDeprecated = _ref4.includeDeprecated;
307
+
315
308
  if (isInputObjectType(type)) {
316
- return objectValues(type.getFields());
309
+ var values = objectValues(type.getFields());
310
+ return includeDeprecated ? values : values.filter(function (field) {
311
+ return field.deprecationReason == null;
312
+ });
317
313
  }
318
314
  }
319
315
  },
@@ -332,7 +328,7 @@ export var __Field = new GraphQLObjectType({
332
328
  fields: function fields() {
333
329
  return {
334
330
  name: {
335
- type: GraphQLNonNull(GraphQLString),
331
+ type: new GraphQLNonNull(GraphQLString),
336
332
  resolve: function resolve(field) {
337
333
  return field.name;
338
334
  }
@@ -344,21 +340,30 @@ export var __Field = new GraphQLObjectType({
344
340
  }
345
341
  },
346
342
  args: {
347
- type: GraphQLNonNull(GraphQLList(GraphQLNonNull(__InputValue))),
348
- resolve: function resolve(field) {
349
- return field.args;
343
+ type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),
344
+ args: {
345
+ includeDeprecated: {
346
+ type: GraphQLBoolean,
347
+ defaultValue: false
348
+ }
349
+ },
350
+ resolve: function resolve(field, _ref5) {
351
+ var includeDeprecated = _ref5.includeDeprecated;
352
+ return includeDeprecated ? field.args : field.args.filter(function (arg) {
353
+ return arg.deprecationReason == null;
354
+ });
350
355
  }
351
356
  },
352
357
  type: {
353
- type: GraphQLNonNull(__Type),
358
+ type: new GraphQLNonNull(__Type),
354
359
  resolve: function resolve(field) {
355
360
  return field.type;
356
361
  }
357
362
  },
358
363
  isDeprecated: {
359
- type: GraphQLNonNull(GraphQLBoolean),
364
+ type: new GraphQLNonNull(GraphQLBoolean),
360
365
  resolve: function resolve(field) {
361
- return field.isDeprecated;
366
+ return field.deprecationReason != null;
362
367
  }
363
368
  },
364
369
  deprecationReason: {
@@ -376,7 +381,7 @@ export var __InputValue = new GraphQLObjectType({
376
381
  fields: function fields() {
377
382
  return {
378
383
  name: {
379
- type: GraphQLNonNull(GraphQLString),
384
+ type: new GraphQLNonNull(GraphQLString),
380
385
  resolve: function resolve(inputValue) {
381
386
  return inputValue.name;
382
387
  }
@@ -388,7 +393,7 @@ export var __InputValue = new GraphQLObjectType({
388
393
  }
389
394
  },
390
395
  type: {
391
- type: GraphQLNonNull(__Type),
396
+ type: new GraphQLNonNull(__Type),
392
397
  resolve: function resolve(inputValue) {
393
398
  return inputValue.type;
394
399
  }
@@ -402,6 +407,18 @@ export var __InputValue = new GraphQLObjectType({
402
407
  var valueAST = astFromValue(defaultValue, type);
403
408
  return valueAST ? print(valueAST) : null;
404
409
  }
410
+ },
411
+ isDeprecated: {
412
+ type: new GraphQLNonNull(GraphQLBoolean),
413
+ resolve: function resolve(field) {
414
+ return field.deprecationReason != null;
415
+ }
416
+ },
417
+ deprecationReason: {
418
+ type: GraphQLString,
419
+ resolve: function resolve(obj) {
420
+ return obj.deprecationReason;
421
+ }
405
422
  }
406
423
  };
407
424
  }
@@ -412,7 +429,7 @@ export var __EnumValue = new GraphQLObjectType({
412
429
  fields: function fields() {
413
430
  return {
414
431
  name: {
415
- type: GraphQLNonNull(GraphQLString),
432
+ type: new GraphQLNonNull(GraphQLString),
416
433
  resolve: function resolve(enumValue) {
417
434
  return enumValue.name;
418
435
  }
@@ -424,9 +441,9 @@ export var __EnumValue = new GraphQLObjectType({
424
441
  }
425
442
  },
426
443
  isDeprecated: {
427
- type: GraphQLNonNull(GraphQLBoolean),
444
+ type: new GraphQLNonNull(GraphQLBoolean),
428
445
  resolve: function resolve(enumValue) {
429
- return enumValue.isDeprecated;
446
+ return enumValue.deprecationReason != null;
430
447
  }
431
448
  },
432
449
  deprecationReason: {
@@ -493,11 +510,11 @@ export var __TypeKind = new GraphQLEnumType({
493
510
 
494
511
  export var SchemaMetaFieldDef = {
495
512
  name: '__schema',
496
- type: GraphQLNonNull(__Schema),
513
+ type: new GraphQLNonNull(__Schema),
497
514
  description: 'Access the current type schema of this server.',
498
515
  args: [],
499
- resolve: function resolve(_source, _args, _context, _ref4) {
500
- var schema = _ref4.schema;
516
+ resolve: function resolve(_source, _args, _context, _ref6) {
517
+ var schema = _ref6.schema;
501
518
  return schema;
502
519
  },
503
520
  isDeprecated: false,
@@ -512,14 +529,15 @@ export var TypeMetaFieldDef = {
512
529
  args: [{
513
530
  name: 'name',
514
531
  description: undefined,
515
- type: GraphQLNonNull(GraphQLString),
532
+ type: new GraphQLNonNull(GraphQLString),
516
533
  defaultValue: undefined,
534
+ deprecationReason: undefined,
517
535
  extensions: undefined,
518
536
  astNode: undefined
519
537
  }],
520
- resolve: function resolve(_source, _ref5, _context, _ref6) {
521
- var name = _ref5.name;
522
- var schema = _ref6.schema;
538
+ resolve: function resolve(_source, _ref7, _context, _ref8) {
539
+ var name = _ref7.name;
540
+ var schema = _ref8.schema;
523
541
  return schema.getType(name);
524
542
  },
525
543
  isDeprecated: false,
@@ -529,11 +547,11 @@ export var TypeMetaFieldDef = {
529
547
  };
530
548
  export var TypeNameMetaFieldDef = {
531
549
  name: '__typename',
532
- type: GraphQLNonNull(GraphQLString),
550
+ type: new GraphQLNonNull(GraphQLString),
533
551
  description: 'The name of the current Object type at runtime.',
534
552
  args: [],
535
- resolve: function resolve(_source, _args, _context, _ref7) {
536
- var parentType = _ref7.parentType;
553
+ resolve: function resolve(_source, _args, _context, _ref9) {
554
+ var parentType = _ref9.parentType;
537
555
  return parentType.name;
538
556
  },
539
557
  isDeprecated: false,
@@ -543,8 +561,8 @@ export var TypeNameMetaFieldDef = {
543
561
  };
544
562
  export var introspectionTypes = Object.freeze([__Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind]);
545
563
  export function isIntrospectionType(type) {
546
- return introspectionTypes.some(function (_ref8) {
547
- var name = _ref8.name;
564
+ return introspectionTypes.some(function (_ref10) {
565
+ var name = _ref10.name;
548
566
  return type.name === name;
549
567
  });
550
568
  }
package/type/scalars.js CHANGED
@@ -6,21 +6,21 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.isSpecifiedScalarType = isSpecifiedScalarType;
7
7
  exports.specifiedScalarTypes = exports.GraphQLID = exports.GraphQLBoolean = exports.GraphQLString = exports.GraphQLFloat = exports.GraphQLInt = void 0;
8
8
 
9
- var _isFinite = _interopRequireDefault(require("../polyfills/isFinite"));
9
+ var _isFinite = _interopRequireDefault(require("../polyfills/isFinite.js"));
10
10
 
11
- var _isInteger = _interopRequireDefault(require("../polyfills/isInteger"));
11
+ var _isInteger = _interopRequireDefault(require("../polyfills/isInteger.js"));
12
12
 
13
- var _inspect = _interopRequireDefault(require("../jsutils/inspect"));
13
+ var _inspect = _interopRequireDefault(require("../jsutils/inspect.js"));
14
14
 
15
- var _isObjectLike = _interopRequireDefault(require("../jsutils/isObjectLike"));
15
+ var _isObjectLike = _interopRequireDefault(require("../jsutils/isObjectLike.js"));
16
16
 
17
- var _kinds = require("../language/kinds");
17
+ var _kinds = require("../language/kinds.js");
18
18
 
19
- var _printer = require("../language/printer");
19
+ var _printer = require("../language/printer.js");
20
20
 
21
- var _GraphQLError = require("../error/GraphQLError");
21
+ var _GraphQLError = require("../error/GraphQLError.js");
22
22
 
23
- var _definition = require("./definition");
23
+ var _definition = require("./definition.js");
24
24
 
25
25
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
26
 
@@ -146,7 +146,7 @@ function serializeObject(outputValue) {
146
146
  }
147
147
 
148
148
  if (typeof outputValue.toJSON === 'function') {
149
- // $FlowFixMe(>=0.90.0)
149
+ // $FlowFixMe[incompatible-use]
150
150
  return outputValue.toJSON();
151
151
  }
152
152
  }