@zuplo/cli 7.14.0 → 7.14.3

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 (285) hide show
  1. package/node_modules/@posthog/types/dist/posthog-config.d.ts +16 -0
  2. package/node_modules/@posthog/types/dist/posthog-config.d.ts.map +1 -1
  3. package/node_modules/@posthog/types/package.json +1 -1
  4. package/node_modules/@posthog/types/src/posthog-config.ts +16 -0
  5. package/node_modules/@zuplo/core/customer.cli.minified.js +252 -252
  6. package/node_modules/@zuplo/core/index.minified.js +257 -257
  7. package/node_modules/@zuplo/core/package.json +1 -1
  8. package/node_modules/@zuplo/graphql/package.json +1 -1
  9. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  10. package/node_modules/@zuplo/otel/package.json +1 -1
  11. package/node_modules/@zuplo/runtime/out/esm/chunk-7RNZS3GX.js +26 -0
  12. package/node_modules/@zuplo/runtime/out/esm/chunk-7RNZS3GX.js.map +1 -0
  13. package/node_modules/@zuplo/runtime/out/esm/chunk-ADPB2ZMZ.js +414 -0
  14. package/node_modules/@zuplo/runtime/out/esm/chunk-ADPB2ZMZ.js.map +1 -0
  15. package/node_modules/@zuplo/runtime/out/esm/chunk-AENEWA54.js +26 -0
  16. package/node_modules/@zuplo/runtime/out/esm/chunk-AENEWA54.js.map +1 -0
  17. package/node_modules/@zuplo/runtime/out/esm/chunk-C32OTSKW.js +91 -0
  18. package/node_modules/@zuplo/runtime/out/esm/chunk-C32OTSKW.js.map +1 -0
  19. package/node_modules/@zuplo/runtime/out/esm/chunk-UFTMOJ7K.js +37 -0
  20. package/node_modules/@zuplo/runtime/out/esm/chunk-UFTMOJ7K.js.map +1 -0
  21. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  22. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  23. package/node_modules/@zuplo/runtime/out/esm/mcp/messages/index.js +1 -1
  24. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +12 -12
  25. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
  26. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  27. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js.map +1 -1
  28. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
  29. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js.map +1 -1
  30. package/node_modules/@zuplo/runtime/out/types/index.d.ts +120 -0
  31. package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +64 -0
  32. package/node_modules/@zuplo/runtime/out/types/mcp/messages/index.d.ts +78 -0
  33. package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +3 -2
  34. package/node_modules/@zuplo/runtime/package.json +1 -1
  35. package/node_modules/graphql/error/GraphQLError.d.ts +5 -1
  36. package/node_modules/graphql/error/GraphQLError.js +12 -7
  37. package/node_modules/graphql/error/GraphQLError.mjs +13 -6
  38. package/node_modules/graphql/error/locatedError.d.ts +6 -4
  39. package/node_modules/graphql/error/locatedError.js +6 -4
  40. package/node_modules/graphql/error/locatedError.mjs +6 -4
  41. package/node_modules/graphql/execution/collectFields.d.ts +1 -0
  42. package/node_modules/graphql/execution/collectFields.js +9 -0
  43. package/node_modules/graphql/execution/collectFields.mjs +9 -0
  44. package/node_modules/graphql/execution/execute.d.ts +9 -10
  45. package/node_modules/graphql/execution/execute.js +44 -29
  46. package/node_modules/graphql/execution/execute.mjs +44 -29
  47. package/node_modules/graphql/execution/mapAsyncIterator.js +12 -11
  48. package/node_modules/graphql/execution/mapAsyncIterator.mjs +12 -11
  49. package/node_modules/graphql/execution/subscribe.d.ts +5 -2
  50. package/node_modules/graphql/execution/subscribe.js +5 -2
  51. package/node_modules/graphql/execution/subscribe.mjs +5 -2
  52. package/node_modules/graphql/execution/values.d.ts +43 -21
  53. package/node_modules/graphql/execution/values.js +52 -24
  54. package/node_modules/graphql/execution/values.mjs +51 -23
  55. package/node_modules/graphql/graphql.d.ts +8 -14
  56. package/node_modules/graphql/graphql.js +16 -15
  57. package/node_modules/graphql/graphql.mjs +11 -15
  58. package/node_modules/graphql/jsutils/SetMap.d.ts +14 -0
  59. package/node_modules/graphql/jsutils/SetMap.js +48 -0
  60. package/node_modules/graphql/jsutils/SetMap.mjs +39 -0
  61. package/node_modules/graphql/jsutils/isIterableObject.d.ts +2 -0
  62. package/node_modules/graphql/jsutils/isIterableObject.js +2 -0
  63. package/node_modules/graphql/jsutils/isIterableObject.mjs +2 -0
  64. package/node_modules/graphql/jsutils/keyMap.d.ts +2 -0
  65. package/node_modules/graphql/jsutils/keyMap.js +2 -0
  66. package/node_modules/graphql/jsutils/keyMap.mjs +2 -0
  67. package/node_modules/graphql/jsutils/keyValMap.d.ts +3 -3
  68. package/node_modules/graphql/jsutils/keyValMap.js +3 -3
  69. package/node_modules/graphql/jsutils/keyValMap.mjs +3 -3
  70. package/node_modules/graphql/language/ast.d.ts +2 -6
  71. package/node_modules/graphql/language/ast.js +2 -6
  72. package/node_modules/graphql/language/ast.mjs +2 -6
  73. package/node_modules/graphql/language/lexer.d.ts +6 -0
  74. package/node_modules/graphql/language/lexer.js +22 -0
  75. package/node_modules/graphql/language/lexer.mjs +22 -0
  76. package/node_modules/graphql/language/location.d.ts +8 -3
  77. package/node_modules/graphql/language/location.js +57 -17
  78. package/node_modules/graphql/language/location.mjs +56 -16
  79. package/node_modules/graphql/language/parser.d.ts +27 -13
  80. package/node_modules/graphql/language/parser.js +31 -9
  81. package/node_modules/graphql/language/parser.mjs +31 -9
  82. package/node_modules/graphql/language/predicates.d.ts +10 -3
  83. package/node_modules/graphql/language/predicates.js +10 -3
  84. package/node_modules/graphql/language/predicates.mjs +10 -3
  85. package/node_modules/graphql/language/printLocation.d.ts +2 -6
  86. package/node_modules/graphql/language/printLocation.js +2 -6
  87. package/node_modules/graphql/language/printLocation.mjs +2 -6
  88. package/node_modules/graphql/language/printer.d.ts +22 -3
  89. package/node_modules/graphql/language/printer.js +394 -308
  90. package/node_modules/graphql/language/printer.mjs +394 -308
  91. package/node_modules/graphql/language/reducer.d.ts +32 -0
  92. package/node_modules/graphql/language/reducer.js +95 -0
  93. package/node_modules/graphql/language/reducer.mjs +86 -0
  94. package/node_modules/graphql/language/source.d.ts +4 -5
  95. package/node_modules/graphql/language/source.js +4 -5
  96. package/node_modules/graphql/language/source.mjs +4 -5
  97. package/node_modules/graphql/language/visitor.d.ts +16 -10
  98. package/node_modules/graphql/language/visitor.js +15 -7
  99. package/node_modules/graphql/language/visitor.mjs +15 -7
  100. package/node_modules/graphql/package.json +1 -4
  101. package/node_modules/graphql/type/definition.d.ts +170 -102
  102. package/node_modules/graphql/type/definition.js +169 -96
  103. package/node_modules/graphql/type/definition.mjs +168 -95
  104. package/node_modules/graphql/type/directives.d.ts +12 -6
  105. package/node_modules/graphql/type/directives.js +12 -6
  106. package/node_modules/graphql/type/directives.mjs +12 -6
  107. package/node_modules/graphql/type/scalars.js +8 -11
  108. package/node_modules/graphql/type/scalars.mjs +1 -1
  109. package/node_modules/graphql/type/schema.d.ts +36 -11
  110. package/node_modules/graphql/type/schema.js +35 -10
  111. package/node_modules/graphql/type/schema.mjs +35 -10
  112. package/node_modules/graphql/type/validate.d.ts +1 -3
  113. package/node_modules/graphql/type/validate.js +1 -3
  114. package/node_modules/graphql/type/validate.mjs +1 -3
  115. package/node_modules/graphql/utilities/TypeInfo.d.ts +15 -11
  116. package/node_modules/graphql/utilities/TypeInfo.js +15 -11
  117. package/node_modules/graphql/utilities/TypeInfo.mjs +15 -11
  118. package/node_modules/graphql/utilities/assertValidName.d.ts +1 -1
  119. package/node_modules/graphql/utilities/assertValidName.js +1 -1
  120. package/node_modules/graphql/utilities/assertValidName.mjs +1 -1
  121. package/node_modules/graphql/utilities/astFromValue.d.ts +3 -1
  122. package/node_modules/graphql/utilities/astFromValue.js +3 -1
  123. package/node_modules/graphql/utilities/astFromValue.mjs +3 -1
  124. package/node_modules/graphql/utilities/buildASTSchema.d.ts +8 -8
  125. package/node_modules/graphql/utilities/buildASTSchema.js +9 -20
  126. package/node_modules/graphql/utilities/buildASTSchema.mjs +9 -20
  127. package/node_modules/graphql/utilities/buildClientSchema.d.ts +6 -2
  128. package/node_modules/graphql/utilities/buildClientSchema.js +6 -2
  129. package/node_modules/graphql/utilities/buildClientSchema.mjs +6 -2
  130. package/node_modules/graphql/utilities/coerceInputValue.d.ts +9 -3
  131. package/node_modules/graphql/utilities/coerceInputValue.js +60 -13
  132. package/node_modules/graphql/utilities/coerceInputValue.mjs +58 -13
  133. package/node_modules/graphql/utilities/concatAST.d.ts +4 -1
  134. package/node_modules/graphql/utilities/concatAST.js +4 -1
  135. package/node_modules/graphql/utilities/concatAST.mjs +4 -1
  136. package/node_modules/graphql/utilities/extendSchema.d.ts +7 -4
  137. package/node_modules/graphql/utilities/extendSchema.js +7 -4
  138. package/node_modules/graphql/utilities/extendSchema.mjs +7 -4
  139. package/node_modules/graphql/utilities/findBreakingChanges.d.ts +2 -2
  140. package/node_modules/graphql/utilities/findBreakingChanges.js +2 -2
  141. package/node_modules/graphql/utilities/findBreakingChanges.mjs +2 -2
  142. package/node_modules/graphql/utilities/getIntrospectionQuery.d.ts +9 -9
  143. package/node_modules/graphql/utilities/getIntrospectionQuery.js +8 -8
  144. package/node_modules/graphql/utilities/getIntrospectionQuery.mjs +8 -8
  145. package/node_modules/graphql/utilities/getOperationAST.d.ts +2 -2
  146. package/node_modules/graphql/utilities/getOperationAST.js +2 -2
  147. package/node_modules/graphql/utilities/getOperationAST.mjs +2 -2
  148. package/node_modules/graphql/utilities/getOperationRootType.d.ts +3 -1
  149. package/node_modules/graphql/utilities/getOperationRootType.js +3 -1
  150. package/node_modules/graphql/utilities/getOperationRootType.mjs +3 -1
  151. package/node_modules/graphql/utilities/introspectionFromSchema.d.ts +12 -4
  152. package/node_modules/graphql/utilities/introspectionFromSchema.js +12 -4
  153. package/node_modules/graphql/utilities/introspectionFromSchema.mjs +12 -4
  154. package/node_modules/graphql/utilities/lexicographicSortSchema.d.ts +17 -13
  155. package/node_modules/graphql/utilities/lexicographicSortSchema.js +17 -13
  156. package/node_modules/graphql/utilities/lexicographicSortSchema.mjs +17 -13
  157. package/node_modules/graphql/utilities/printSchema.d.ts +7 -4
  158. package/node_modules/graphql/utilities/printSchema.js +7 -4
  159. package/node_modules/graphql/utilities/printSchema.mjs +7 -4
  160. package/node_modules/graphql/utilities/resolveSchemaCoordinate.d.ts +9 -8
  161. package/node_modules/graphql/utilities/resolveSchemaCoordinate.js +9 -8
  162. package/node_modules/graphql/utilities/resolveSchemaCoordinate.mjs +9 -8
  163. package/node_modules/graphql/utilities/separateOperations.d.ts +2 -2
  164. package/node_modules/graphql/utilities/separateOperations.js +2 -2
  165. package/node_modules/graphql/utilities/separateOperations.mjs +2 -2
  166. package/node_modules/graphql/utilities/stripIgnoredCharacters.d.ts +19 -5
  167. package/node_modules/graphql/utilities/stripIgnoredCharacters.js +19 -5
  168. package/node_modules/graphql/utilities/stripIgnoredCharacters.mjs +19 -5
  169. package/node_modules/graphql/utilities/typeComparators.d.ts +1 -5
  170. package/node_modules/graphql/utilities/typeComparators.js +1 -5
  171. package/node_modules/graphql/utilities/typeComparators.mjs +1 -5
  172. package/node_modules/graphql/utilities/valueFromAST.js +4 -4
  173. package/node_modules/graphql/utilities/valueFromAST.mjs +4 -4
  174. package/node_modules/graphql/utilities/valueFromASTUntyped.d.ts +1 -3
  175. package/node_modules/graphql/utilities/valueFromASTUntyped.js +1 -3
  176. package/node_modules/graphql/utilities/valueFromASTUntyped.mjs +1 -3
  177. package/node_modules/graphql/validation/ValidationContext.d.ts +22 -3
  178. package/node_modules/graphql/validation/ValidationContext.js +84 -27
  179. package/node_modules/graphql/validation/ValidationContext.mjs +82 -27
  180. package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.d.ts +6 -4
  181. package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js +6 -4
  182. package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs +6 -4
  183. package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.d.ts +4 -4
  184. package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js +10 -6
  185. package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs +12 -6
  186. package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.d.ts +6 -4
  187. package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js +6 -4
  188. package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs +6 -4
  189. package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.d.ts +4 -4
  190. package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js +26 -17
  191. package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs +21 -11
  192. package/node_modules/graphql/validation/rules/KnownDirectivesRule.d.ts +1 -3
  193. package/node_modules/graphql/validation/rules/KnownDirectivesRule.js +1 -3
  194. package/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs +1 -3
  195. package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.d.ts +4 -4
  196. package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js +4 -4
  197. package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs +4 -4
  198. package/node_modules/graphql/validation/rules/KnownTypeNamesRule.d.ts +1 -3
  199. package/node_modules/graphql/validation/rules/KnownTypeNamesRule.js +7 -7
  200. package/node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs +7 -7
  201. package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.d.ts +6 -4
  202. package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js +6 -4
  203. package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs +6 -4
  204. package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.d.ts +6 -4
  205. package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js +44 -19
  206. package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs +44 -19
  207. package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.d.ts +1 -3
  208. package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js +1 -3
  209. package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs +1 -3
  210. package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.d.ts +4 -4
  211. package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js +4 -4
  212. package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs +4 -4
  213. package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.d.ts +4 -4
  214. package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js +10 -14
  215. package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs +10 -14
  216. package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.d.ts +4 -4
  217. package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js +4 -4
  218. package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs +4 -4
  219. package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts +8 -6
  220. package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js +552 -354
  221. package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +545 -352
  222. package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.d.ts +6 -4
  223. package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js +6 -4
  224. package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs +6 -4
  225. package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.d.ts +6 -4
  226. package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js +6 -4
  227. package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs +6 -4
  228. package/node_modules/graphql/validation/rules/ScalarLeafsRule.d.ts +1 -3
  229. package/node_modules/graphql/validation/rules/ScalarLeafsRule.js +1 -3
  230. package/node_modules/graphql/validation/rules/ScalarLeafsRule.mjs +1 -3
  231. package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.d.ts +6 -4
  232. package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js +50 -9
  233. package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs +50 -9
  234. package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.d.ts +4 -4
  235. package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js +4 -4
  236. package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs +4 -4
  237. package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.d.ts +6 -4
  238. package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +6 -4
  239. package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs +6 -4
  240. package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.d.ts +4 -4
  241. package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js +4 -4
  242. package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs +4 -4
  243. package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.d.ts +6 -4
  244. package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js +6 -4
  245. package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs +6 -4
  246. package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.d.ts +4 -4
  247. package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js +4 -4
  248. package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs +4 -4
  249. package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.d.ts +4 -4
  250. package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js +4 -4
  251. package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs +4 -4
  252. package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.d.ts +4 -4
  253. package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +29 -23
  254. package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs +24 -14
  255. package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.d.ts +6 -4
  256. package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js +6 -4
  257. package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs +6 -4
  258. package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.d.ts +6 -4
  259. package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js +6 -4
  260. package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs +6 -4
  261. package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.d.ts +4 -4
  262. package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js +4 -4
  263. package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs +4 -4
  264. package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts +7 -5
  265. package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +7 -5
  266. package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs +7 -5
  267. package/node_modules/graphql/validation/validate.d.ts +2 -0
  268. package/node_modules/graphql/validation/validate.js +14 -2
  269. package/node_modules/graphql/validation/validate.mjs +13 -2
  270. package/node_modules/graphql/validation/validationAbortedError.d.ts +3 -0
  271. package/node_modules/graphql/validation/validationAbortedError.js +14 -0
  272. package/node_modules/graphql/validation/validationAbortedError.mjs +4 -0
  273. package/node_modules/graphql/version.js +3 -3
  274. package/node_modules/graphql/version.mjs +3 -3
  275. package/package.json +11 -11
  276. package/node_modules/@zuplo/runtime/out/esm/chunk-4SVXBKXH.js +0 -414
  277. package/node_modules/@zuplo/runtime/out/esm/chunk-4SVXBKXH.js.map +0 -1
  278. package/node_modules/@zuplo/runtime/out/esm/chunk-7FFIW3HF.js +0 -26
  279. package/node_modules/@zuplo/runtime/out/esm/chunk-7FFIW3HF.js.map +0 -1
  280. package/node_modules/@zuplo/runtime/out/esm/chunk-QGAJTUPE.js +0 -26
  281. package/node_modules/@zuplo/runtime/out/esm/chunk-QGAJTUPE.js.map +0 -1
  282. package/node_modules/@zuplo/runtime/out/esm/chunk-WUZE2HKB.js +0 -102
  283. package/node_modules/@zuplo/runtime/out/esm/chunk-WUZE2HKB.js.map +0 -1
  284. /package/node_modules/@zuplo/runtime/out/esm/{chunk-4SVXBKXH.js.LEGAL.txt → chunk-ADPB2ZMZ.js.LEGAL.txt} +0 -0
  285. /package/node_modules/@zuplo/runtime/out/esm/{chunk-WUZE2HKB.js.LEGAL.txt → chunk-UFTMOJ7K.js.LEGAL.txt} +0 -0
@@ -22,6 +22,7 @@ export function collectFields(
22
22
  variableValues,
23
23
  runtimeType,
24
24
  selectionSet,
25
+ onSelectionSet,
25
26
  ) {
26
27
  const fields = new Map();
27
28
  collectFieldsImpl(
@@ -32,6 +33,7 @@ export function collectFields(
32
33
  selectionSet,
33
34
  fields,
34
35
  new Set(),
36
+ onSelectionSet,
35
37
  );
36
38
  return fields;
37
39
  }
@@ -81,7 +83,12 @@ function collectFieldsImpl(
81
83
  selectionSet,
82
84
  fields,
83
85
  visitedFragmentNames,
86
+ onSelectionSet,
84
87
  ) {
88
+ onSelectionSet === null || onSelectionSet === void 0
89
+ ? void 0
90
+ : onSelectionSet(selectionSet);
91
+
85
92
  for (const selection of selectionSet.selections) {
86
93
  switch (selection.kind) {
87
94
  case Kind.FIELD: {
@@ -117,6 +124,7 @@ function collectFieldsImpl(
117
124
  selection.selectionSet,
118
125
  fields,
119
126
  visitedFragmentNames,
127
+ onSelectionSet,
120
128
  );
121
129
  break;
122
130
  }
@@ -149,6 +157,7 @@ function collectFieldsImpl(
149
157
  fragment.selectionSet,
150
158
  fields,
151
159
  visitedFragmentNames,
160
+ onSelectionSet,
152
161
  );
153
162
  break;
154
163
  }
@@ -102,6 +102,8 @@ export interface FormattedExecutionResult<
102
102
  }
103
103
  /** Arguments accepted by execute and executeSync. */
104
104
  export interface ExecutionArgs {
105
+ /** Omit suggestions from input coercion errors. */
106
+ hideSuggestions?: Maybe<boolean>;
105
107
  /** The schema used for validation or execution. */
106
108
  schema: GraphQLSchema;
107
109
  /** The parsed GraphQL document to execute. */
@@ -162,12 +164,10 @@ export interface ExecutionArgs {
162
164
  * schema,
163
165
  * document: parse('query ($name: String!) { greeting(name: $name) }'),
164
166
  * rootValue: {
165
- * greeting: ({ name }) => `Hello, ${name}!`,
167
+ * greeting: ({ name }: { name: string }) => `Hello, ${name}!`,
166
168
  * },
167
169
  * variableValues: { name: 'Ada' },
168
- * });
169
- *
170
- * result; // => { data: { greeting: 'Hello, Ada!' } }
170
+ * }); // => { data: { greeting: 'Hello, Ada!' } }
171
171
  * ```
172
172
  * @example
173
173
  * ```ts
@@ -196,8 +196,7 @@ export interface ExecutionArgs {
196
196
  * rootValue: { viewer: { kind: 'user', name: 'Ada' } },
197
197
  * contextValue: { locale: 'en' },
198
198
  * operationName: 'Viewer',
199
- * fieldResolver: (source, _args, contextValue, info) => {
200
- * contextValue.locale; // => 'en'
199
+ * fieldResolver: (source, _args, _contextValue, info) => {
201
200
  * return source[info.fieldName];
202
201
  * },
203
202
  * typeResolver: (value) => {
@@ -231,8 +230,8 @@ export interface ExecutionArgs {
231
230
  * },
232
231
  * });
233
232
  *
234
- * result.data.broken; // => null
235
- * result.errors[0].message; // => 'Resolver failed.'
233
+ * result.data?.broken; // => null
234
+ * result.errors?.[0].message; // => 'Resolver failed.'
236
235
  * ```
237
236
  * @example
238
237
  * ```ts
@@ -267,8 +266,8 @@ export interface ExecutionArgs {
267
266
  * options: { maxCoercionErrors: 1 },
268
267
  * });
269
268
  *
270
- * result.errors.length; // => 2
271
- * result.errors[1].message; // matches /error limit reached/
269
+ * result.errors?.length; // => 2
270
+ * result.errors?.[1].message.includes('error limit reached'); // => true
272
271
  * ```
273
272
  */
274
273
  export declare function execute(
@@ -175,12 +175,10 @@ class CollectedErrors {
175
175
  * schema,
176
176
  * document: parse('query ($name: String!) { greeting(name: $name) }'),
177
177
  * rootValue: {
178
- * greeting: ({ name }) => `Hello, ${name}!`,
178
+ * greeting: ({ name }: { name: string }) => `Hello, ${name}!`,
179
179
  * },
180
180
  * variableValues: { name: 'Ada' },
181
- * });
182
- *
183
- * result; // => { data: { greeting: 'Hello, Ada!' } }
181
+ * }); // => { data: { greeting: 'Hello, Ada!' } }
184
182
  * ```
185
183
  * @example
186
184
  * ```ts
@@ -209,8 +207,7 @@ class CollectedErrors {
209
207
  * rootValue: { viewer: { kind: 'user', name: 'Ada' } },
210
208
  * contextValue: { locale: 'en' },
211
209
  * operationName: 'Viewer',
212
- * fieldResolver: (source, _args, contextValue, info) => {
213
- * contextValue.locale; // => 'en'
210
+ * fieldResolver: (source, _args, _contextValue, info) => {
214
211
  * return source[info.fieldName];
215
212
  * },
216
213
  * typeResolver: (value) => {
@@ -244,8 +241,8 @@ class CollectedErrors {
244
241
  * },
245
242
  * });
246
243
  *
247
- * result.data.broken; // => null
248
- * result.errors[0].message; // => 'Resolver failed.'
244
+ * result.data?.broken; // => null
245
+ * result.errors?.[0].message; // => 'Resolver failed.'
249
246
  * ```
250
247
  * @example
251
248
  * ```ts
@@ -280,8 +277,8 @@ class CollectedErrors {
280
277
  * options: { maxCoercionErrors: 1 },
281
278
  * });
282
279
  *
283
- * result.errors.length; // => 2
284
- * result.errors[1].message; // matches /error limit reached/
280
+ * result.errors?.length; // => 2
281
+ * result.errors?.[1].message.includes('error limit reached'); // => true
285
282
  * ```
286
283
  */
287
284
  function execute(args) {
@@ -435,7 +432,10 @@ function assertValidExecutionArguments(schema, document, rawVariableValues) {
435
432
  */
436
433
 
437
434
  function buildExecutionContext(args) {
438
- var _definition$name, _operation$variableDe, _options$maxCoercionE;
435
+ var _definition$name,
436
+ _operation$variableDe,
437
+ _options$maxCoercionE,
438
+ _args$hideSuggestions;
439
439
 
440
440
  const {
441
441
  schema,
@@ -518,6 +518,11 @@ function buildExecutionContext(args) {
518
518
  _options$maxCoercionE !== void 0
519
519
  ? _options$maxCoercionE
520
520
  : 50,
521
+ hideSuggestions:
522
+ (_args$hideSuggestions = args.hideSuggestions) !== null &&
523
+ _args$hideSuggestions !== void 0
524
+ ? _args$hideSuggestions
525
+ : false,
521
526
  },
522
527
  );
523
528
 
@@ -1206,27 +1211,37 @@ const defaultTypeResolver = function (value, contextValue, info, abstractType) {
1206
1211
  const possibleTypes = info.schema.getPossibleTypes(abstractType);
1207
1212
  const promisedIsTypeOfResults = [];
1208
1213
 
1209
- for (let i = 0; i < possibleTypes.length; i++) {
1210
- const type = possibleTypes[i];
1211
-
1212
- if (type.isTypeOf) {
1213
- const isTypeOfResult = type.isTypeOf(value, contextValue, info);
1214
-
1215
- if ((0, _isPromise.isPromise)(isTypeOfResult)) {
1216
- promisedIsTypeOfResults[i] = isTypeOfResult;
1217
- } else if (isTypeOfResult) {
1218
- if (promisedIsTypeOfResults.length) {
1219
- // Explicitly ignore any promise rejections
1220
- Promise.allSettled(promisedIsTypeOfResults)
1221
- /* c8 ignore next 3 */
1222
- .catch(() => {
1223
- // Do nothing
1224
- });
1225
- }
1214
+ try {
1215
+ for (let i = 0; i < possibleTypes.length; i++) {
1216
+ const type = possibleTypes[i];
1217
+
1218
+ if (type.isTypeOf) {
1219
+ const isTypeOfResult = type.isTypeOf(value, contextValue, info);
1220
+
1221
+ if ((0, _isPromise.isPromise)(isTypeOfResult)) {
1222
+ promisedIsTypeOfResults[i] = isTypeOfResult;
1223
+ } else if (isTypeOfResult) {
1224
+ if (promisedIsTypeOfResults.length) {
1225
+ // Explicitly ignore any promise rejections
1226
+ Promise.allSettled(promisedIsTypeOfResults)
1227
+ /* c8 ignore next 3 */
1228
+ .catch(() => {
1229
+ // Do nothing
1230
+ });
1231
+ }
1226
1232
 
1227
- return type.name;
1233
+ return type.name;
1234
+ }
1228
1235
  }
1229
1236
  }
1237
+ } catch (error) {
1238
+ if (promisedIsTypeOfResults.length) {
1239
+ return Promise.allSettled(promisedIsTypeOfResults).then(() => {
1240
+ throw error;
1241
+ });
1242
+ }
1243
+
1244
+ throw error;
1230
1245
  }
1231
1246
 
1232
1247
  if (promisedIsTypeOfResults.length) {
@@ -155,12 +155,10 @@ class CollectedErrors {
155
155
  * schema,
156
156
  * document: parse('query ($name: String!) { greeting(name: $name) }'),
157
157
  * rootValue: {
158
- * greeting: ({ name }) => `Hello, ${name}!`,
158
+ * greeting: ({ name }: { name: string }) => `Hello, ${name}!`,
159
159
  * },
160
160
  * variableValues: { name: 'Ada' },
161
- * });
162
- *
163
- * result; // => { data: { greeting: 'Hello, Ada!' } }
161
+ * }); // => { data: { greeting: 'Hello, Ada!' } }
164
162
  * ```
165
163
  * @example
166
164
  * ```ts
@@ -189,8 +187,7 @@ class CollectedErrors {
189
187
  * rootValue: { viewer: { kind: 'user', name: 'Ada' } },
190
188
  * contextValue: { locale: 'en' },
191
189
  * operationName: 'Viewer',
192
- * fieldResolver: (source, _args, contextValue, info) => {
193
- * contextValue.locale; // => 'en'
190
+ * fieldResolver: (source, _args, _contextValue, info) => {
194
191
  * return source[info.fieldName];
195
192
  * },
196
193
  * typeResolver: (value) => {
@@ -224,8 +221,8 @@ class CollectedErrors {
224
221
  * },
225
222
  * });
226
223
  *
227
- * result.data.broken; // => null
228
- * result.errors[0].message; // => 'Resolver failed.'
224
+ * result.data?.broken; // => null
225
+ * result.errors?.[0].message; // => 'Resolver failed.'
229
226
  * ```
230
227
  * @example
231
228
  * ```ts
@@ -260,8 +257,8 @@ class CollectedErrors {
260
257
  * options: { maxCoercionErrors: 1 },
261
258
  * });
262
259
  *
263
- * result.errors.length; // => 2
264
- * result.errors[1].message; // matches /error limit reached/
260
+ * result.errors?.length; // => 2
261
+ * result.errors?.[1].message.includes('error limit reached'); // => true
265
262
  * ```
266
263
  */
267
264
  export function execute(args) {
@@ -419,7 +416,10 @@ export function assertValidExecutionArguments(
419
416
  */
420
417
 
421
418
  export function buildExecutionContext(args) {
422
- var _definition$name, _operation$variableDe, _options$maxCoercionE;
419
+ var _definition$name,
420
+ _operation$variableDe,
421
+ _options$maxCoercionE,
422
+ _args$hideSuggestions;
423
423
 
424
424
  const {
425
425
  schema,
@@ -498,6 +498,11 @@ export function buildExecutionContext(args) {
498
498
  _options$maxCoercionE !== void 0
499
499
  ? _options$maxCoercionE
500
500
  : 50,
501
+ hideSuggestions:
502
+ (_args$hideSuggestions = args.hideSuggestions) !== null &&
503
+ _args$hideSuggestions !== void 0
504
+ ? _args$hideSuggestions
505
+ : false,
501
506
  },
502
507
  );
503
508
 
@@ -1176,27 +1181,37 @@ export const defaultTypeResolver = function (
1176
1181
  const possibleTypes = info.schema.getPossibleTypes(abstractType);
1177
1182
  const promisedIsTypeOfResults = [];
1178
1183
 
1179
- for (let i = 0; i < possibleTypes.length; i++) {
1180
- const type = possibleTypes[i];
1181
-
1182
- if (type.isTypeOf) {
1183
- const isTypeOfResult = type.isTypeOf(value, contextValue, info);
1184
-
1185
- if (isPromise(isTypeOfResult)) {
1186
- promisedIsTypeOfResults[i] = isTypeOfResult;
1187
- } else if (isTypeOfResult) {
1188
- if (promisedIsTypeOfResults.length) {
1189
- // Explicitly ignore any promise rejections
1190
- Promise.allSettled(promisedIsTypeOfResults)
1191
- /* c8 ignore next 3 */
1192
- .catch(() => {
1193
- // Do nothing
1194
- });
1195
- }
1184
+ try {
1185
+ for (let i = 0; i < possibleTypes.length; i++) {
1186
+ const type = possibleTypes[i];
1187
+
1188
+ if (type.isTypeOf) {
1189
+ const isTypeOfResult = type.isTypeOf(value, contextValue, info);
1190
+
1191
+ if (isPromise(isTypeOfResult)) {
1192
+ promisedIsTypeOfResults[i] = isTypeOfResult;
1193
+ } else if (isTypeOfResult) {
1194
+ if (promisedIsTypeOfResults.length) {
1195
+ // Explicitly ignore any promise rejections
1196
+ Promise.allSettled(promisedIsTypeOfResults)
1197
+ /* c8 ignore next 3 */
1198
+ .catch(() => {
1199
+ // Do nothing
1200
+ });
1201
+ }
1196
1202
 
1197
- return type.name;
1203
+ return type.name;
1204
+ }
1198
1205
  }
1199
1206
  }
1207
+ } catch (error) {
1208
+ if (promisedIsTypeOfResults.length) {
1209
+ return Promise.allSettled(promisedIsTypeOfResults).then(() => {
1210
+ throw error;
1211
+ });
1212
+ }
1213
+
1214
+ throw error;
1200
1215
  }
1201
1216
 
1202
1217
  if (promisedIsTypeOfResults.length) {
@@ -25,18 +25,18 @@ function mapAsyncIterator(iterable, callback) {
25
25
  done: false,
26
26
  };
27
27
  } catch (error) {
28
- /* c8 ignore start */
29
- // FIXME: add test case
30
- if (typeof iterator.return === 'function') {
31
- try {
32
- await iterator.return();
33
- } catch (_e) {
34
- /* ignore error */
35
- }
36
- }
37
-
28
+ await returnIgnoringErrors();
38
29
  throw error;
39
- /* c8 ignore stop */
30
+ }
31
+ }
32
+
33
+ async function returnIgnoringErrors() {
34
+ if (typeof iterator.return === 'function') {
35
+ try {
36
+ await iterator.return();
37
+ } catch (_error) {
38
+ // Keep the original error when closing the source also fails.
39
+ }
40
40
  }
41
41
  }
42
42
 
@@ -60,6 +60,7 @@ function mapAsyncIterator(iterable, callback) {
60
60
  return mapResult(await iterator.throw(error));
61
61
  }
62
62
 
63
+ await returnIgnoringErrors();
63
64
  throw error;
64
65
  },
65
66
 
@@ -18,18 +18,18 @@ export function mapAsyncIterator(iterable, callback) {
18
18
  done: false,
19
19
  };
20
20
  } catch (error) {
21
- /* c8 ignore start */
22
- // FIXME: add test case
23
- if (typeof iterator.return === 'function') {
24
- try {
25
- await iterator.return();
26
- } catch (_e) {
27
- /* ignore error */
28
- }
29
- }
30
-
21
+ await returnIgnoringErrors();
31
22
  throw error;
32
- /* c8 ignore stop */
23
+ }
24
+ }
25
+
26
+ async function returnIgnoringErrors() {
27
+ if (typeof iterator.return === 'function') {
28
+ try {
29
+ await iterator.return();
30
+ } catch (_error) {
31
+ // Keep the original error when closing the source also fails.
32
+ }
33
33
  }
34
34
  }
35
35
 
@@ -53,6 +53,7 @@ export function mapAsyncIterator(iterable, callback) {
53
53
  return mapResult(await iterator.throw(error));
54
54
  }
55
55
 
56
+ await returnIgnoringErrors();
56
57
  throw error;
57
58
  },
58
59
 
@@ -97,7 +97,10 @@ import type { ExecutionArgs, ExecutionResult } from './execute';
97
97
  * 'subscription Greeting($locale: String) { greeting(locale: $locale) }',
98
98
  * ),
99
99
  * rootValue: {
100
- * greeting: (args, contextValue) => {
100
+ * greeting: (
101
+ * args: { locale?: string },
102
+ * contextValue: { defaultLocale: string },
103
+ * ) => {
101
104
  * const locale = args.locale ?? contextValue.defaultLocale;
102
105
  * return locale === 'fr' ? frenchGreetings() : defaultGreetings();
103
106
  * },
@@ -137,7 +140,7 @@ import type { ExecutionArgs, ExecutionResult } from './execute';
137
140
  *
138
141
  * assert('errors' in result);
139
142
  *
140
- * result.errors[0].message; // => 'Schema is not configured to execute subscription operation.'
143
+ * result.errors?.[0].message; // => 'Schema is not configured to execute subscription operation.'
141
144
  * ```
142
145
  */
143
146
  export declare function subscribe(
@@ -121,7 +121,10 @@ var _values = require('./values.js');
121
121
  * 'subscription Greeting($locale: String) { greeting(locale: $locale) }',
122
122
  * ),
123
123
  * rootValue: {
124
- * greeting: (args, contextValue) => {
124
+ * greeting: (
125
+ * args: { locale?: string },
126
+ * contextValue: { defaultLocale: string },
127
+ * ) => {
125
128
  * const locale = args.locale ?? contextValue.defaultLocale;
126
129
  * return locale === 'fr' ? frenchGreetings() : defaultGreetings();
127
130
  * },
@@ -161,7 +164,7 @@ var _values = require('./values.js');
161
164
  *
162
165
  * assert('errors' in result);
163
166
  *
164
- * result.errors[0].message; // => 'Schema is not configured to execute subscription operation.'
167
+ * result.errors?.[0].message; // => 'Schema is not configured to execute subscription operation.'
165
168
  * ```
166
169
  */
167
170
  async function subscribe(args) {
@@ -109,7 +109,10 @@ import { getArgumentValues } from './values.mjs';
109
109
  * 'subscription Greeting($locale: String) { greeting(locale: $locale) }',
110
110
  * ),
111
111
  * rootValue: {
112
- * greeting: (args, contextValue) => {
112
+ * greeting: (
113
+ * args: { locale?: string },
114
+ * contextValue: { defaultLocale: string },
115
+ * ) => {
113
116
  * const locale = args.locale ?? contextValue.defaultLocale;
114
117
  * return locale === 'fr' ? frenchGreetings() : defaultGreetings();
115
118
  * },
@@ -149,7 +152,7 @@ import { getArgumentValues } from './values.mjs';
149
152
  *
150
153
  * assert('errors' in result);
151
154
  *
152
- * result.errors[0].message; // => 'Schema is not configured to execute subscription operation.'
155
+ * result.errors?.[0].message; // => 'Schema is not configured to execute subscription operation.'
153
156
  * ```
154
157
  */
155
158
 
@@ -26,6 +26,8 @@ declare type CoercedVariableValues =
26
26
  * @internal
27
27
  */
28
28
  export interface GetVariableValuesOptions {
29
+ /** Omit suggestions from input coercion errors. */
30
+ hideSuggestions?: boolean;
29
31
  /**
30
32
  * Maximum number of variable coercion errors before coercion stops.
31
33
  * @internal
@@ -47,8 +49,9 @@ export interface GetVariableValuesOptions {
47
49
  * @returns Coerced variable values, or request errors.
48
50
  * @example
49
51
  * ```ts
52
+ * import assert from 'node:assert/strict';
50
53
  * // Coerce provided variables and apply operation defaults.
51
- * import { parse } from 'graphql/language';
54
+ * import { parse, Kind } from 'graphql/language';
52
55
  * import { buildSchema } from 'graphql/utilities';
53
56
  * import { getVariableValues } from 'graphql/execution';
54
57
  *
@@ -63,19 +66,19 @@ export interface GetVariableValuesOptions {
63
66
  * }
64
67
  * `);
65
68
  * const operation = document.definitions[0];
69
+ * assert(operation.kind === Kind.OPERATION_DEFINITION);
66
70
  *
67
- * const result = getVariableValues(
68
- * schema,
69
- * operation.variableDefinitions,
70
- * { stars: '5' },
71
- * );
71
+ * const result = getVariableValues(schema, operation.variableDefinitions ?? [], {
72
+ * stars: 5,
73
+ * });
72
74
  *
73
75
  * result; // => { coerced: { stars: 5, limit: 10 } }
74
76
  * ```
75
77
  * @example
76
78
  * ```ts
79
+ * import assert from 'node:assert/strict';
77
80
  * // This variant uses maxErrors to cap reported coercion errors.
78
- * import { parse } from 'graphql/language';
81
+ * import { parse, Kind } from 'graphql/language';
79
82
  * import { buildSchema } from 'graphql/utilities';
80
83
  * import { getVariableValues } from 'graphql/execution';
81
84
  *
@@ -95,16 +98,17 @@ export interface GetVariableValuesOptions {
95
98
  * }
96
99
  * `);
97
100
  * const operation = document.definitions[0];
101
+ * assert(operation.kind === Kind.OPERATION_DEFINITION);
98
102
  *
99
103
  * const result = getVariableValues(
100
104
  * schema,
101
- * operation.variableDefinitions,
105
+ * operation.variableDefinitions ?? [],
102
106
  * { first: { stars: 'bad' }, second: { stars: 'also bad' } },
103
107
  * { maxErrors: 1 },
104
108
  * );
105
109
  *
106
- * result.errors.length; // => 2
107
- * result.errors[1].message; // matches /error limit reached/
110
+ * result.errors?.length; // => 2
111
+ * result.errors?.[1].message.includes('error limit reached'); // => true
108
112
  * ```
109
113
  */
110
114
  export declare function getVariableValues(
@@ -128,8 +132,9 @@ export declare function getVariableValues(
128
132
  * @returns Coerced argument values keyed by argument name.
129
133
  * @example
130
134
  * ```ts
135
+ * import assert from 'node:assert/strict';
131
136
  * // Read literal argument values and defaults.
132
- * import { parse } from 'graphql/language';
137
+ * import { parse, Kind } from 'graphql/language';
133
138
  * import { buildSchema } from 'graphql/utilities';
134
139
  * import { getArgumentValues } from 'graphql/execution';
135
140
  *
@@ -138,16 +143,21 @@ export declare function getVariableValues(
138
143
  * reviews(stars: Int!, limit: Int = 10): [String]
139
144
  * }
140
145
  * `);
141
- * const fieldDef = schema.getQueryType().getFields().reviews;
146
+ * const fieldDef = schema.getQueryType()?.getFields().reviews;
147
+ * assert(fieldDef);
142
148
  * const document = parse('{ reviews(stars: 5) }');
143
- * const fieldNode = document.definitions[0].selectionSet.selections[0];
149
+ * const operation = document.definitions[0];
150
+ * assert(operation.kind === Kind.OPERATION_DEFINITION);
151
+ * const fieldNode = operation.selectionSet.selections[0];
152
+ * assert(fieldNode.kind === Kind.FIELD);
144
153
  *
145
154
  * getArgumentValues(fieldDef, fieldNode); // => { stars: 5, limit: 10 }
146
155
  * ```
147
156
  * @example
148
157
  * ```ts
158
+ * import assert from 'node:assert/strict';
149
159
  * // This variant resolves argument values from operation variables.
150
- * import { parse } from 'graphql/language';
160
+ * import { parse, Kind } from 'graphql/language';
151
161
  * import { buildSchema } from 'graphql/utilities';
152
162
  * import { getArgumentValues } from 'graphql/execution';
153
163
  *
@@ -156,9 +166,13 @@ export declare function getVariableValues(
156
166
  * reviews(stars: Int!): [String]
157
167
  * }
158
168
  * `);
159
- * const fieldDef = schema.getQueryType().getFields().reviews;
169
+ * const fieldDef = schema.getQueryType()?.getFields().reviews;
170
+ * assert(fieldDef);
160
171
  * const document = parse('query ($stars: Int!) { reviews(stars: $stars) }');
161
- * const fieldNode = document.definitions[0].selectionSet.selections[0];
172
+ * const operation = document.definitions[0];
173
+ * assert(operation.kind === Kind.OPERATION_DEFINITION);
174
+ * const fieldNode = operation.selectionSet.selections[0];
175
+ * assert(fieldNode.kind === Kind.FIELD);
162
176
  *
163
177
  * getArgumentValues(fieldDef, fieldNode, { stars: 5 }); // => { stars: 5 }
164
178
  * getArgumentValues(fieldDef, fieldNode, {}); // throws an error
@@ -198,25 +212,33 @@ export interface DirectiveValuesNode {
198
212
  * @returns Coerced directive argument values keyed by argument name.
199
213
  * @example
200
214
  * ```ts
215
+ * import assert from 'node:assert/strict';
201
216
  * // Read literal directive arguments from a node.
202
- * import { parse } from 'graphql/language';
217
+ * import { parse, Kind } from 'graphql/language';
203
218
  * import { GraphQLSkipDirective } from 'graphql/type';
204
219
  * import { getDirectiveValues } from 'graphql/execution';
205
220
  *
206
221
  * const document = parse('{ name @skip(if: true) }');
207
- * const fieldNode = document.definitions[0].selectionSet.selections[0];
222
+ * const operation = document.definitions[0];
223
+ * assert(operation.kind === Kind.OPERATION_DEFINITION);
224
+ * const fieldNode = operation.selectionSet.selections[0];
208
225
  *
209
226
  * getDirectiveValues(GraphQLSkipDirective, fieldNode); // => { if: true }
210
227
  * ```
211
228
  * @example
212
229
  * ```ts
230
+ * import assert from 'node:assert/strict';
213
231
  * // This variant resolves directive arguments from variables and handles absent directives.
214
- * import { parse } from 'graphql/language';
232
+ * import { parse, Kind } from 'graphql/language';
215
233
  * import { GraphQLIncludeDirective } from 'graphql/type';
216
234
  * import { getDirectiveValues } from 'graphql/execution';
217
235
  *
218
- * const document = parse('query ($includeName: Boolean!) { name @include(if: $includeName) }');
219
- * const fieldNode = document.definitions[0].selectionSet.selections[0];
236
+ * const document = parse(
237
+ * 'query ($includeName: Boolean!) { name @include(if: $includeName) }',
238
+ * );
239
+ * const operation = document.definitions[0];
240
+ * assert(operation.kind === Kind.OPERATION_DEFINITION);
241
+ * const fieldNode = operation.selectionSet.selections[0];
220
242
  *
221
243
  * getDirectiveValues(GraphQLIncludeDirective, fieldNode, {
222
244
  * includeName: false,