graphql 2.6.15 → 2.6.16

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 (378) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generators/graphql/core.rb +1 -0
  3. data/lib/generators/graphql/detailed_trace_generator.rb +1 -0
  4. data/lib/generators/graphql/enum_generator.rb +1 -0
  5. data/lib/generators/graphql/field_extractor.rb +1 -0
  6. data/lib/generators/graphql/input_generator.rb +1 -0
  7. data/lib/generators/graphql/install/mutation_root_generator.rb +1 -0
  8. data/lib/generators/graphql/install_generator.rb +1 -0
  9. data/lib/generators/graphql/interface_generator.rb +1 -0
  10. data/lib/generators/graphql/loader_generator.rb +1 -0
  11. data/lib/generators/graphql/mutation_create_generator.rb +1 -0
  12. data/lib/generators/graphql/mutation_delete_generator.rb +1 -0
  13. data/lib/generators/graphql/mutation_generator.rb +1 -0
  14. data/lib/generators/graphql/mutation_update_generator.rb +1 -0
  15. data/lib/generators/graphql/object_generator.rb +1 -0
  16. data/lib/generators/graphql/orm_mutations_base.rb +1 -0
  17. data/lib/generators/graphql/relay.rb +1 -0
  18. data/lib/generators/graphql/relay_generator.rb +1 -0
  19. data/lib/generators/graphql/scalar_generator.rb +1 -0
  20. data/lib/generators/graphql/type_generator.rb +1 -0
  21. data/lib/generators/graphql/union_generator.rb +1 -0
  22. data/lib/graphql/analysis/analyzer.rb +1 -0
  23. data/lib/graphql/analysis/field_usage.rb +1 -0
  24. data/lib/graphql/analysis/max_query_complexity.rb +1 -0
  25. data/lib/graphql/analysis/max_query_depth.rb +1 -0
  26. data/lib/graphql/analysis/query_complexity.rb +5 -1
  27. data/lib/graphql/analysis/query_depth.rb +1 -0
  28. data/lib/graphql/analysis/visitor.rb +1 -0
  29. data/lib/graphql/analysis.rb +1 -0
  30. data/lib/graphql/analysis_error.rb +1 -0
  31. data/lib/graphql/autoload.rb +1 -0
  32. data/lib/graphql/backtrace/table.rb +1 -0
  33. data/lib/graphql/backtrace/traced_error.rb +1 -0
  34. data/lib/graphql/backtrace.rb +1 -0
  35. data/lib/graphql/coercion_error.rb +1 -0
  36. data/lib/graphql/current.rb +1 -0
  37. data/lib/graphql/dashboard/application_controller.rb +1 -0
  38. data/lib/graphql/dashboard/detailed_traces.rb +1 -0
  39. data/lib/graphql/dashboard/installable.rb +1 -0
  40. data/lib/graphql/dashboard/landings_controller.rb +1 -0
  41. data/lib/graphql/dashboard/limiters.rb +1 -0
  42. data/lib/graphql/dashboard/operation_store.rb +1 -0
  43. data/lib/graphql/dashboard/statics_controller.rb +1 -0
  44. data/lib/graphql/dashboard/subscriptions.rb +1 -0
  45. data/lib/graphql/dashboard.rb +1 -0
  46. data/lib/graphql/dataloader/active_record_association_source.rb +1 -0
  47. data/lib/graphql/dataloader/active_record_source.rb +1 -0
  48. data/lib/graphql/dataloader/async_dataloader.rb +1 -0
  49. data/lib/graphql/dataloader/null_dataloader.rb +1 -0
  50. data/lib/graphql/dataloader/request.rb +1 -0
  51. data/lib/graphql/dataloader/request_all.rb +1 -0
  52. data/lib/graphql/dataloader/source.rb +1 -0
  53. data/lib/graphql/dataloader.rb +1 -0
  54. data/lib/graphql/date_encoding_error.rb +1 -0
  55. data/lib/graphql/dig.rb +1 -0
  56. data/lib/graphql/duration_encoding_error.rb +1 -0
  57. data/lib/graphql/execution/directive_checks.rb +1 -0
  58. data/lib/graphql/execution/errors.rb +1 -0
  59. data/lib/graphql/execution/field_resolve_step.rb +1 -0
  60. data/lib/graphql/execution/finalize.rb +1 -0
  61. data/lib/graphql/execution/input_values.rb +42 -6
  62. data/lib/graphql/execution/interpreter/argument_value.rb +1 -0
  63. data/lib/graphql/execution/interpreter/arguments.rb +1 -0
  64. data/lib/graphql/execution/interpreter/arguments_cache.rb +1 -0
  65. data/lib/graphql/execution/interpreter/execution_errors.rb +7 -4
  66. data/lib/graphql/execution/interpreter/handles_raw_value.rb +6 -2
  67. data/lib/graphql/execution/interpreter/resolve.rb +6 -2
  68. data/lib/graphql/execution/interpreter/runtime/graphql_result.rb +1 -0
  69. data/lib/graphql/execution/interpreter/runtime.rb +5 -3
  70. data/lib/graphql/execution/interpreter.rb +7 -4
  71. data/lib/graphql/execution/lazy/lazy_method_map.rb +1 -0
  72. data/lib/graphql/execution/lazy.rb +1 -0
  73. data/lib/graphql/execution/load_argument_step.rb +1 -0
  74. data/lib/graphql/execution/lookahead.rb +2 -0
  75. data/lib/graphql/execution/multiplex.rb +1 -0
  76. data/lib/graphql/execution/next.rb +1 -0
  77. data/lib/graphql/execution/prepare_object_step.rb +3 -5
  78. data/lib/graphql/execution/resolve_type_step.rb +1 -0
  79. data/lib/graphql/execution/runner.rb +2 -0
  80. data/lib/graphql/execution/selections_step.rb +1 -0
  81. data/lib/graphql/execution/variable_values.rb +20 -6
  82. data/lib/graphql/execution.rb +1 -0
  83. data/lib/graphql/execution_error.rb +1 -0
  84. data/lib/graphql/float_decoding_error.rb +1 -0
  85. data/lib/graphql/float_encoding_error.rb +1 -0
  86. data/lib/graphql/integer_decoding_error.rb +1 -0
  87. data/lib/graphql/integer_encoding_error.rb +1 -0
  88. data/lib/graphql/introspection/base_object.rb +1 -0
  89. data/lib/graphql/introspection/directive_location_enum.rb +1 -0
  90. data/lib/graphql/introspection/directive_type.rb +1 -0
  91. data/lib/graphql/introspection/dynamic_fields.rb +1 -0
  92. data/lib/graphql/introspection/entry_points.rb +1 -0
  93. data/lib/graphql/introspection/enum_value_type.rb +1 -0
  94. data/lib/graphql/introspection/field_type.rb +1 -0
  95. data/lib/graphql/introspection/input_value_type.rb +1 -0
  96. data/lib/graphql/introspection/introspection_query.rb +10 -7
  97. data/lib/graphql/introspection/schema_type.rb +1 -0
  98. data/lib/graphql/introspection/type_kind_enum.rb +1 -0
  99. data/lib/graphql/introspection/type_type.rb +1 -0
  100. data/lib/graphql/introspection.rb +1 -0
  101. data/lib/graphql/invalid_name_error.rb +1 -0
  102. data/lib/graphql/invalid_null_error.rb +1 -0
  103. data/lib/graphql/language/block_string.rb +12 -5
  104. data/lib/graphql/language/cache.rb +1 -0
  105. data/lib/graphql/language/comment.rb +1 -0
  106. data/lib/graphql/language/definition_slice.rb +1 -0
  107. data/lib/graphql/language/document_from_schema_definition.rb +1 -0
  108. data/lib/graphql/language/generation.rb +1 -0
  109. data/lib/graphql/language/lexer.rb +4 -4
  110. data/lib/graphql/language/nodes.rb +1 -0
  111. data/lib/graphql/language/parser.rb +1 -0
  112. data/lib/graphql/language/printer.rb +1 -0
  113. data/lib/graphql/language/sanitized_printer.rb +1 -0
  114. data/lib/graphql/language/static_visitor.rb +1 -0
  115. data/lib/graphql/language/visitor.rb +1 -0
  116. data/lib/graphql/language.rb +1 -0
  117. data/lib/graphql/load_application_object_failed_error.rb +1 -0
  118. data/lib/graphql/name_validator.rb +1 -0
  119. data/lib/graphql/pagination/active_record_relation_connection.rb +9 -1
  120. data/lib/graphql/pagination/array_connection.rb +1 -0
  121. data/lib/graphql/pagination/connection.rb +1 -0
  122. data/lib/graphql/pagination/connections.rb +1 -0
  123. data/lib/graphql/pagination/mongoid_relation_connection.rb +6 -1
  124. data/lib/graphql/pagination/relation_connection.rb +5 -4
  125. data/lib/graphql/pagination/sequel_dataset_connection.rb +6 -1
  126. data/lib/graphql/pagination.rb +1 -0
  127. data/lib/graphql/parse_error.rb +1 -0
  128. data/lib/graphql/query/context/scoped_context.rb +1 -0
  129. data/lib/graphql/query/context.rb +1 -0
  130. data/lib/graphql/query/fingerprint.rb +1 -0
  131. data/lib/graphql/query/input_validation_result.rb +44 -0
  132. data/lib/graphql/query/null_context.rb +1 -0
  133. data/lib/graphql/query/partial.rb +1 -0
  134. data/lib/graphql/query/result.rb +1 -0
  135. data/lib/graphql/query/validation_pipeline.rb +1 -0
  136. data/lib/graphql/query/variable_validation_error.rb +1 -0
  137. data/lib/graphql/query.rb +1 -0
  138. data/lib/graphql/railtie.rb +1 -0
  139. data/lib/graphql/rake_task/validate.rb +1 -0
  140. data/lib/graphql/rake_task.rb +1 -0
  141. data/lib/graphql/relay/range_add.rb +1 -0
  142. data/lib/graphql/relay.rb +1 -0
  143. data/lib/graphql/rubocop/graphql/base_cop.rb +1 -0
  144. data/lib/graphql/rubocop/graphql/default_null_true.rb +1 -0
  145. data/lib/graphql/rubocop/graphql/default_required_true.rb +1 -0
  146. data/lib/graphql/rubocop/graphql/field_type_in_block.rb +1 -0
  147. data/lib/graphql/rubocop/graphql/root_types_in_block.rb +1 -0
  148. data/lib/graphql/rubocop.rb +1 -0
  149. data/lib/graphql/runtime_error.rb +1 -0
  150. data/lib/graphql/runtime_type_error.rb +1 -0
  151. data/lib/graphql/schema/addition.rb +1 -0
  152. data/lib/graphql/schema/always_visible.rb +1 -0
  153. data/lib/graphql/schema/argument.rb +1 -0
  154. data/lib/graphql/schema/base_64_encoder.rb +1 -0
  155. data/lib/graphql/schema/build_from_definition/resolve_map/default_resolve.rb +6 -3
  156. data/lib/graphql/schema/build_from_definition/resolve_map.rb +1 -0
  157. data/lib/graphql/schema/build_from_definition.rb +1 -0
  158. data/lib/graphql/schema/built_in_types.rb +1 -0
  159. data/lib/graphql/schema/directive/deprecated.rb +1 -0
  160. data/lib/graphql/schema/directive/feature.rb +1 -0
  161. data/lib/graphql/schema/directive/flagged.rb +5 -1
  162. data/lib/graphql/schema/directive/include.rb +1 -0
  163. data/lib/graphql/schema/directive/one_of.rb +5 -2
  164. data/lib/graphql/schema/directive/skip.rb +1 -0
  165. data/lib/graphql/schema/directive/specified_by.rb +1 -0
  166. data/lib/graphql/schema/directive/transform.rb +9 -4
  167. data/lib/graphql/schema/directive.rb +1 -0
  168. data/lib/graphql/schema/enum.rb +1 -0
  169. data/lib/graphql/schema/enum_value.rb +1 -0
  170. data/lib/graphql/schema/field/connection_extension.rb +6 -2
  171. data/lib/graphql/schema/field/scope_extension.rb +1 -0
  172. data/lib/graphql/schema/field.rb +1 -0
  173. data/lib/graphql/schema/field_extension.rb +1 -0
  174. data/lib/graphql/schema/find_inherited_value.rb +1 -0
  175. data/lib/graphql/schema/finder.rb +1 -0
  176. data/lib/graphql/schema/has_single_input_argument.rb +1 -0
  177. data/lib/graphql/schema/input_object.rb +1 -0
  178. data/lib/graphql/schema/interface.rb +1 -0
  179. data/lib/graphql/schema/introspection_system.rb +1 -0
  180. data/lib/graphql/schema/late_bound_type.rb +1 -0
  181. data/lib/graphql/schema/list.rb +1 -0
  182. data/lib/graphql/schema/loader.rb +1 -0
  183. data/lib/graphql/schema/member/base_dsl_methods.rb +1 -0
  184. data/lib/graphql/schema/member/build_type.rb +1 -0
  185. data/lib/graphql/schema/member/graphql_type_names.rb +1 -0
  186. data/lib/graphql/schema/member/has_arguments.rb +1 -0
  187. data/lib/graphql/schema/member/has_ast_node.rb +7 -2
  188. data/lib/graphql/schema/member/has_authorization.rb +7 -4
  189. data/lib/graphql/schema/member/has_dataloader.rb +1 -0
  190. data/lib/graphql/schema/member/has_deprecation_reason.rb +7 -2
  191. data/lib/graphql/schema/member/has_directives.rb +1 -0
  192. data/lib/graphql/schema/member/has_fields.rb +1 -0
  193. data/lib/graphql/schema/member/has_interfaces.rb +1 -0
  194. data/lib/graphql/schema/member/has_path.rb +1 -0
  195. data/lib/graphql/schema/member/has_unresolved_type_error.rb +1 -0
  196. data/lib/graphql/schema/member/has_validators.rb +1 -0
  197. data/lib/graphql/schema/member/relay_shortcuts.rb +1 -0
  198. data/lib/graphql/schema/member/scoped.rb +7 -3
  199. data/lib/graphql/schema/member/type_system_helpers.rb +1 -0
  200. data/lib/graphql/schema/member/validates_input.rb +7 -1
  201. data/lib/graphql/schema/member.rb +1 -0
  202. data/lib/graphql/schema/mutation.rb +1 -0
  203. data/lib/graphql/schema/non_null.rb +1 -0
  204. data/lib/graphql/schema/object.rb +1 -0
  205. data/lib/graphql/schema/printer.rb +1 -0
  206. data/lib/graphql/schema/ractor_shareable.rb +1 -0
  207. data/lib/graphql/schema/relay_classic_mutation.rb +8 -3
  208. data/lib/graphql/schema/resolver/has_payload_type.rb +1 -0
  209. data/lib/graphql/schema/resolver.rb +3 -1
  210. data/lib/graphql/schema/scalar.rb +27 -3
  211. data/lib/graphql/schema/subscription.rb +1 -0
  212. data/lib/graphql/schema/timeout.rb +1 -0
  213. data/lib/graphql/schema/type_expression.rb +1 -0
  214. data/lib/graphql/schema/type_membership.rb +1 -0
  215. data/lib/graphql/schema/union.rb +1 -0
  216. data/lib/graphql/schema/unique_within_type.rb +1 -0
  217. data/lib/graphql/schema/validator/all_validator.rb +1 -0
  218. data/lib/graphql/schema/validator/allow_blank_validator.rb +5 -2
  219. data/lib/graphql/schema/validator/allow_null_validator.rb +6 -3
  220. data/lib/graphql/schema/validator/exclusion_validator.rb +7 -4
  221. data/lib/graphql/schema/validator/format_validator.rb +7 -4
  222. data/lib/graphql/schema/validator/inclusion_validator.rb +6 -3
  223. data/lib/graphql/schema/validator/length_validator.rb +1 -0
  224. data/lib/graphql/schema/validator/numericality_validator.rb +1 -0
  225. data/lib/graphql/schema/validator/required_validator.rb +1 -0
  226. data/lib/graphql/schema/validator.rb +3 -2
  227. data/lib/graphql/schema/visibility/migration.rb +1 -0
  228. data/lib/graphql/schema/visibility/profile.rb +1 -0
  229. data/lib/graphql/schema/visibility/visit.rb +1 -0
  230. data/lib/graphql/schema/visibility.rb +1 -0
  231. data/lib/graphql/schema/warden.rb +1 -0
  232. data/lib/graphql/schema/wrapper.rb +1 -0
  233. data/lib/graphql/schema.rb +1 -0
  234. data/lib/graphql/static_validation/all_rules.rb +1 -0
  235. data/lib/graphql/static_validation/base_visitor.rb +1 -0
  236. data/lib/graphql/static_validation/definition_dependencies.rb +1 -0
  237. data/lib/graphql/static_validation/error.rb +14 -5
  238. data/lib/graphql/static_validation/interpreter_visitor.rb +1 -0
  239. data/lib/graphql/static_validation/rules/argument_literals_are_compatible.rb +9 -3
  240. data/lib/graphql/static_validation/rules/argument_literals_are_compatible_error.rb +16 -8
  241. data/lib/graphql/static_validation/rules/argument_names_are_unique.rb +1 -0
  242. data/lib/graphql/static_validation/rules/argument_names_are_unique_error.rb +8 -3
  243. data/lib/graphql/static_validation/rules/arguments_are_defined.rb +10 -4
  244. data/lib/graphql/static_validation/rules/arguments_are_defined_error.rb +14 -6
  245. data/lib/graphql/static_validation/rules/directives_are_defined.rb +7 -9
  246. data/lib/graphql/static_validation/rules/directives_are_defined_error.rb +8 -3
  247. data/lib/graphql/static_validation/rules/directives_are_in_valid_locations.rb +12 -7
  248. data/lib/graphql/static_validation/rules/directives_are_in_valid_locations_error.rb +10 -4
  249. data/lib/graphql/static_validation/rules/fields_are_defined_on_type.rb +1 -0
  250. data/lib/graphql/static_validation/rules/fields_are_defined_on_type_error.rb +10 -4
  251. data/lib/graphql/static_validation/rules/fields_have_appropriate_selections.rb +1 -0
  252. data/lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb +10 -4
  253. data/lib/graphql/static_validation/rules/fields_will_merge.rb +2 -3
  254. data/lib/graphql/static_validation/rules/fields_will_merge_error.rb +15 -4
  255. data/lib/graphql/static_validation/rules/fragment_names_are_unique.rb +10 -5
  256. data/lib/graphql/static_validation/rules/fragment_names_are_unique_error.rb +8 -3
  257. data/lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb +30 -14
  258. data/lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb +12 -5
  259. data/lib/graphql/static_validation/rules/fragment_types_exist.rb +11 -6
  260. data/lib/graphql/static_validation/rules/fragment_types_exist_error.rb +8 -3
  261. data/lib/graphql/static_validation/rules/fragments_are_finite.rb +1 -0
  262. data/lib/graphql/static_validation/rules/fragments_are_finite_error.rb +8 -3
  263. data/lib/graphql/static_validation/rules/fragments_are_named.rb +1 -0
  264. data/lib/graphql/static_validation/rules/fragments_are_named_error.rb +1 -0
  265. data/lib/graphql/static_validation/rules/fragments_are_on_composite_types.rb +1 -0
  266. data/lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb +8 -4
  267. data/lib/graphql/static_validation/rules/fragments_are_used.rb +1 -0
  268. data/lib/graphql/static_validation/rules/fragments_are_used_error.rb +8 -3
  269. data/lib/graphql/static_validation/rules/input_object_names_are_unique.rb +1 -0
  270. data/lib/graphql/static_validation/rules/input_object_names_are_unique_error.rb +8 -3
  271. data/lib/graphql/static_validation/rules/mutation_root_exists.rb +1 -0
  272. data/lib/graphql/static_validation/rules/mutation_root_exists_error.rb +1 -0
  273. data/lib/graphql/static_validation/rules/no_definitions_are_present.rb +7 -3
  274. data/lib/graphql/static_validation/rules/no_definitions_are_present_error.rb +1 -0
  275. data/lib/graphql/static_validation/rules/not_single_subscription_error.rb +1 -0
  276. data/lib/graphql/static_validation/rules/one_of_input_objects_are_valid.rb +10 -4
  277. data/lib/graphql/static_validation/rules/one_of_input_objects_are_valid_error.rb +7 -2
  278. data/lib/graphql/static_validation/rules/operation_names_are_valid.rb +10 -4
  279. data/lib/graphql/static_validation/rules/operation_names_are_valid_error.rb +7 -2
  280. data/lib/graphql/static_validation/rules/query_root_exists.rb +1 -0
  281. data/lib/graphql/static_validation/rules/query_root_exists_error.rb +1 -0
  282. data/lib/graphql/static_validation/rules/required_arguments_are_present.rb +19 -10
  283. data/lib/graphql/static_validation/rules/required_arguments_are_present_error.rb +12 -5
  284. data/lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb +5 -1
  285. data/lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb +1 -0
  286. data/lib/graphql/static_validation/rules/subscription_root_exists_and_single_subscription_selection.rb +1 -0
  287. data/lib/graphql/static_validation/rules/subscription_root_exists_error.rb +1 -0
  288. data/lib/graphql/static_validation/rules/unique_directives_per_location.rb +2 -1
  289. data/lib/graphql/static_validation/rules/unique_directives_per_location_error.rb +8 -3
  290. data/lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed.rb +1 -0
  291. data/lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed_error.rb +13 -6
  292. data/lib/graphql/static_validation/rules/variable_names_are_unique.rb +1 -0
  293. data/lib/graphql/static_validation/rules/variable_names_are_unique_error.rb +8 -3
  294. data/lib/graphql/static_validation/rules/variable_usages_are_allowed.rb +16 -8
  295. data/lib/graphql/static_validation/rules/variable_usages_are_allowed_error.rb +14 -6
  296. data/lib/graphql/static_validation/rules/variables_are_input_types.rb +8 -5
  297. data/lib/graphql/static_validation/rules/variables_are_input_types_error.rb +10 -4
  298. data/lib/graphql/static_validation/rules/variables_are_used_and_defined.rb +1 -0
  299. data/lib/graphql/static_validation/rules/variables_are_used_and_defined_error.rb +11 -5
  300. data/lib/graphql/static_validation/validation_context.rb +4 -1
  301. data/lib/graphql/static_validation/validation_timeout_error.rb +1 -0
  302. data/lib/graphql/static_validation/validator.rb +7 -3
  303. data/lib/graphql/static_validation.rb +1 -0
  304. data/lib/graphql/string_encoding_error.rb +1 -0
  305. data/lib/graphql/subscriptions/action_cable_subscriptions.rb +1 -0
  306. data/lib/graphql/subscriptions/broadcast_analyzer.rb +1 -0
  307. data/lib/graphql/subscriptions/default_subscription_resolve_extension.rb +1 -0
  308. data/lib/graphql/subscriptions/event.rb +1 -0
  309. data/lib/graphql/subscriptions/serialize.rb +1 -0
  310. data/lib/graphql/subscriptions.rb +1 -0
  311. data/lib/graphql/testing/helpers.rb +1 -0
  312. data/lib/graphql/testing/mock_action_cable.rb +1 -0
  313. data/lib/graphql/testing.rb +1 -0
  314. data/lib/graphql/tracing/active_support_notifications_trace.rb +1 -0
  315. data/lib/graphql/tracing/active_support_notifications_tracing.rb +1 -0
  316. data/lib/graphql/tracing/appoptics_trace.rb +1 -0
  317. data/lib/graphql/tracing/appoptics_tracing.rb +1 -0
  318. data/lib/graphql/tracing/appsignal_trace.rb +1 -0
  319. data/lib/graphql/tracing/appsignal_tracing.rb +1 -0
  320. data/lib/graphql/tracing/call_legacy_tracers.rb +1 -0
  321. data/lib/graphql/tracing/data_dog_trace.rb +1 -0
  322. data/lib/graphql/tracing/data_dog_tracing.rb +1 -0
  323. data/lib/graphql/tracing/detailed_trace/active_record_backend.rb +1 -0
  324. data/lib/graphql/tracing/detailed_trace/memory_backend.rb +1 -0
  325. data/lib/graphql/tracing/detailed_trace/redis_backend.rb +1 -0
  326. data/lib/graphql/tracing/detailed_trace.rb +1 -0
  327. data/lib/graphql/tracing/legacy_hooks_trace.rb +1 -0
  328. data/lib/graphql/tracing/legacy_trace.rb +1 -0
  329. data/lib/graphql/tracing/monitor_trace.rb +1 -0
  330. data/lib/graphql/tracing/new_relic_trace.rb +1 -0
  331. data/lib/graphql/tracing/new_relic_tracing.rb +1 -0
  332. data/lib/graphql/tracing/notifications_trace.rb +1 -0
  333. data/lib/graphql/tracing/notifications_tracing.rb +1 -0
  334. data/lib/graphql/tracing/null_trace.rb +1 -0
  335. data/lib/graphql/tracing/perfetto_trace/trace_pb.rb +1 -0
  336. data/lib/graphql/tracing/perfetto_trace.rb +1 -0
  337. data/lib/graphql/tracing/platform_trace.rb +1 -0
  338. data/lib/graphql/tracing/platform_tracing.rb +1 -0
  339. data/lib/graphql/tracing/prometheus_trace/graphql_collector.rb +1 -0
  340. data/lib/graphql/tracing/prometheus_trace.rb +1 -0
  341. data/lib/graphql/tracing/prometheus_tracing.rb +1 -0
  342. data/lib/graphql/tracing/scout_trace.rb +1 -0
  343. data/lib/graphql/tracing/scout_tracing.rb +1 -0
  344. data/lib/graphql/tracing/sentry_trace.rb +1 -0
  345. data/lib/graphql/tracing/statsd_trace.rb +1 -0
  346. data/lib/graphql/tracing/statsd_tracing.rb +1 -0
  347. data/lib/graphql/tracing/trace.rb +1 -0
  348. data/lib/graphql/tracing.rb +1 -0
  349. data/lib/graphql/type_kinds.rb +1 -0
  350. data/lib/graphql/types/big_int.rb +1 -0
  351. data/lib/graphql/types/boolean.rb +1 -0
  352. data/lib/graphql/types/float.rb +4 -1
  353. data/lib/graphql/types/id.rb +1 -0
  354. data/lib/graphql/types/int.rb +6 -3
  355. data/lib/graphql/types/iso_8601_date.rb +3 -1
  356. data/lib/graphql/types/iso_8601_date_time.rb +1 -0
  357. data/lib/graphql/types/iso_8601_duration.rb +4 -2
  358. data/lib/graphql/types/json.rb +4 -1
  359. data/lib/graphql/types/relay/base_connection.rb +1 -0
  360. data/lib/graphql/types/relay/base_edge.rb +1 -0
  361. data/lib/graphql/types/relay/connection_behaviors.rb +1 -2
  362. data/lib/graphql/types/relay/edge_behaviors.rb +1 -2
  363. data/lib/graphql/types/relay/has_node_field.rb +7 -1
  364. data/lib/graphql/types/relay/has_nodes_field.rb +7 -1
  365. data/lib/graphql/types/relay/node.rb +1 -0
  366. data/lib/graphql/types/relay/node_behaviors.rb +7 -1
  367. data/lib/graphql/types/relay/page_info.rb +1 -0
  368. data/lib/graphql/types/relay/page_info_behaviors.rb +1 -0
  369. data/lib/graphql/types/relay.rb +1 -0
  370. data/lib/graphql/types/string.rb +3 -1
  371. data/lib/graphql/types.rb +1 -0
  372. data/lib/graphql/unauthorized_enum_value_error.rb +1 -0
  373. data/lib/graphql/unauthorized_error.rb +1 -0
  374. data/lib/graphql/unauthorized_field_error.rb +1 -0
  375. data/lib/graphql/unresolved_type_error.rb +1 -0
  376. data/lib/graphql/version.rb +2 -1
  377. data/lib/graphql.rb +1 -0
  378. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8207cb9fb1f93b3364a2866d4ad0113b9fb6711fed18173ab1b63a73c3b7004d
4
- data.tar.gz: 170e3f0d0bb725d6d1bc6d21c2d086d3023d169544ea17bfc5d6765df57be66e
3
+ metadata.gz: dabeb6b9d960e5b9a9d0019a23cf805257fa3e445a0f4471be1d3a637bf1d21d
4
+ data.tar.gz: 3a5e41f0f2944783ae728593d1dd2f37603fc03e72707ff238282f00bd3ac781
5
5
  SHA512:
6
- metadata.gz: bb6cdc6648667c5547960a18ffd070cb8c6cb98360adbd47316b792f4c16e594b9a074ff62028c44e3f041d9e7f28860b7f2fd3e4bc42db73d9f43ce0e81ae53
7
- data.tar.gz: cb4b25050266be8b405105144a5b52ee82602b6dd8e99d1f9c32d8d29443e96b19a8af283584c3d5e69ae85f6747348421bdc21693673ed2678d896c5375f6ea
6
+ metadata.gz: '098a02fe09246339124e447985982c6472d529ce7d79ff3794fddbd294efd05547ca2e8c8372d063a8e38735f1aab8329cb5a7950f8a93c89c97a1be651cf337'
7
+ data.tar.gz: d9004f574e42797bef5248ad6197ffa048afd9941ea4594e3a345d661e5eba70bd831c56e1322704fed07d8ec5de42620ec3df34984f6223f87dc140a68fbcc1
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'rails/generators/base'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'rails/generators/active_record'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'generators/graphql/type_generator'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'rails/generators/base'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'generators/graphql/type_generator'
4
5
  require 'generators/graphql/field_extractor'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
 
4
5
  require "rails/generators/base"
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'rails/generators'
4
5
  require 'rails/generators/base'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'generators/graphql/type_generator'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'rails/generators'
4
5
  require "rails/generators/named_base"
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require_relative 'orm_mutations_base'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require_relative 'orm_mutations_base'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'rails/generators'
4
5
  require 'rails/generators/named_base'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require_relative 'orm_mutations_base'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'generators/graphql/type_generator'
4
5
  require 'generators/graphql/field_extractor'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'rails/generators'
4
5
  require 'rails/generators/named_base'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  module Graphql
4
5
  module Generators
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'rails/generators'
4
5
  require 'rails/generators/base'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'generators/graphql/type_generator'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'rails/generators'
4
5
  require 'rails/generators/base'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require 'generators/graphql/type_generator'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  module Analysis
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  module Analysis
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: strict
3
4
  module GraphQL
4
5
  module Analysis
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: strict
3
4
  module GraphQL
4
5
  module Analysis
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  module Analysis
@@ -160,6 +161,8 @@ module GraphQL
160
161
  possible_scope_types.delete(possible_scope_type)
161
162
  end
162
163
 
164
+ complexities_by_selections = {}
165
+
163
166
  # Aggregate the lexical selections that may apply to each possible type,
164
167
  # and then return the maximum cost among possible typed selections.
165
168
  possible_scope_types.each_key.reduce(0) do |max, possible_scope_type|
@@ -171,7 +174,8 @@ module GraphQL
171
174
  end
172
175
 
173
176
  # Find the maximum complexity for the scope type among possible lexical branches.
174
- complexity = case mode
177
+ selections_key = all_inner_selections.map(&:object_id)
178
+ complexity = complexities_by_selections[selections_key] ||= case mode
175
179
  when :legacy
176
180
  legacy_merged_max_complexity(query, all_inner_selections)
177
181
  when :future
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  module Analysis
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  module Analysis
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  require "graphql/analysis/visitor"
4
5
  require "graphql/analysis/analyzer"
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: strict
3
4
  module GraphQL
4
5
  class AnalysisError < GraphQL::ExecutionError
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
 
4
5
  module GraphQL
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  class Backtrace
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  class Backtrace
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  require "graphql/backtrace/table"
4
5
  require "graphql/backtrace/traced_error"
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: strict
3
4
  module GraphQL
4
5
  class CoercionError < GraphQL::ExecutionError
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: strict
3
4
 
4
5
  module GraphQL
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require "action_controller"
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require_relative "./installable"
4
5
  module Graphql
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  module Graphql
4
5
  class Dashboard < Rails::Engine
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  module Graphql
4
5
  class Dashboard < Rails::Engine
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require_relative "./installable"
4
5
  module Graphql
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require_relative "./installable"
4
5
  module Graphql
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  module Graphql
4
5
  class Dashboard < Rails::Engine
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: ignore
3
4
  require_relative "./installable"
4
5
  module Graphql
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: strict
3
4
  require 'rails/engine'
4
5
  require 'action_controller'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  require "graphql/dataloader/source"
4
5
  require "graphql/dataloader/active_record_source"
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  require "graphql/dataloader/source"
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
 
4
5
  module GraphQL
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
 
4
5
  module GraphQL
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  class Dataloader
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  class Dataloader
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
 
4
5
  module GraphQL
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
 
4
5
  require "graphql/dataloader/null_dataloader"
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: strict
3
4
  module GraphQL
4
5
  # This error is raised when `Types::ISO8601Date` is asked to return a value
data/lib/graphql/dig.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  module Dig
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: strict
3
4
  module GraphQL
4
5
  # This error is raised when `Types::ISO8601Duration` is asked to return a value
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: strict
3
4
  module GraphQL
4
5
  module Execution
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: strict
3
4
 
4
5
  module GraphQL
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  module Execution
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  module Execution
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
  module GraphQL
4
5
  module Execution
@@ -56,6 +57,10 @@ module GraphQL
56
57
  private
57
58
 
58
59
  def argument_value(argument_values, argument_key, argument_definition, arg_value, override_type, field_resolve_step)
60
+ if arg_value.is_a?(DeferredCoercion)
61
+ # Raises CoercionError, which becomes a field error
62
+ arg_value = arg_value.coerce(@query.context)
63
+ end
59
64
  treat_as_type = override_type || argument_definition.type
60
65
  if treat_as_type.non_null?
61
66
  if arg_value.nil?
@@ -163,12 +168,31 @@ module GraphQL
163
168
  # - `String, nil` — A description of the problem, if there is one
164
169
  attr_reader :explanation
165
170
 
166
- def initialize(explanation = nil)
171
+ # **Returns**
172
+ #
173
+ # - `GraphQL::Query::InputValidationResult, nil` — The result from `validate_non_null_input`, if there was one
174
+ attr_reader :validation_result
175
+
176
+ def initialize(explanation = nil, validation_result: nil)
167
177
  @explanation = explanation
178
+ @validation_result = validation_result
168
179
  super(explanation || "Invalid literal value")
169
180
  end
170
181
  end
171
182
 
183
+ # Stands in for a scalar value whose `validate_non_null_input` accepted it without returning a coerced value.
184
+ # [argument_values](rdoc-ref:#argument_values) calls `coerce_input` when it finds one of these.
185
+ class DeferredCoercion # :nodoc:
186
+ def initialize(type, value)
187
+ @type = type
188
+ @value = value
189
+ end
190
+
191
+ def coerce(context)
192
+ @type.coerce_input(@value, context)
193
+ end
194
+ end
195
+
172
196
  # Coerce `value_node` (a literal from a query string or a default value) for `type`.
173
197
  #
174
198
  # **Parameters**
@@ -320,15 +344,27 @@ module GraphQL
320
344
  else
321
345
  value_node
322
346
  end
323
- coerced_value = begin
324
- type.coerce_input(ruby_value, @query.context)
347
+ scalar_result = begin
348
+ type.validate_non_null_input(ruby_value, @query.context)
325
349
  rescue GraphQL::CoercionError
326
350
  raise
327
351
  rescue StandardError => err
328
- @query.handle_or_reraise(err)
352
+ return literals[value_node] = @query.handle_or_reraise(err)
329
353
  end
330
- if coerced_value.nil?
331
- raise InvalidLiteralError, "Could not coerce value #{GraphQL::Language.serialize(ruby_value)} to #{type.graphql_name}"
354
+
355
+ coerced_value = if scalar_result && !scalar_result.valid?
356
+ problems = scalar_result.problems
357
+ if problems.nil? || problems.empty?
358
+ raise InvalidLiteralError, "Could not coerce value #{GraphQL::Language.serialize(ruby_value)} to #{type.graphql_name}"
359
+ else
360
+ raise InvalidLiteralError.new(problems.first["explanation"], validation_result: scalar_result)
361
+ end
362
+ elsif scalar_result&.coerced_value?
363
+ scalar_result.coerced_value
364
+ else
365
+ # A custom `validate_non_null_input` accepted this value but didn't provide a coerced value.
366
+ # Call `coerce_input` at runtime, like GraphQL-Ruby did before 2.6.15.
367
+ DeferredCoercion.new(type, ruby_value)
332
368
  end
333
369
  literals[value_node] = coerced_value
334
370
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
 
4
5
  module GraphQL
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
 
4
5
  module GraphQL
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ #--
2
3
  # typed: true
3
4
 
4
5
  module GraphQL
@@ -1,16 +1,19 @@
1
1
  # frozen_string_literal: true
2
- # typed: true
2
+ #--
3
+ # typed: strict
3
4
 
4
5
  module GraphQL
5
6
  module Execution
6
7
  class Interpreter
7
8
  class ExecutionErrors
9
+ #: (GraphQL::Query::Context ctx, GraphQL::Language::Nodes::AbstractNode ast_node, Array[String | Integer] path) -> void
8
10
  def initialize(ctx, ast_node, path)
9
- @context = ctx
10
- @ast_node = ast_node
11
- @path = path
11
+ @context = ctx #: GraphQL::Query::Context
12
+ @ast_node = ast_node #: GraphQL::Language::Nodes::AbstractNode
13
+ @path = path #: Array[String | Integer]
12
14
  end
13
15
 
16
+ #: (Object err_or_msg) -> void
14
17
  def add(err_or_msg)
15
18
  err = case err_or_msg
16
19
  when String
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
- # typed: true
2
+ #--
3
+ # typed: strict
3
4
 
4
5
  module GraphQL
5
6
  module Execution
@@ -8,14 +9,17 @@ module GraphQL
8
9
  class RawValue
9
10
  include GraphQL::Execution::Finalizer
10
11
 
12
+ #: (GraphQL::Query query, untyped result_data, String | Integer result_key) -> void
11
13
  def finalize_graphql_result(query, result_data, result_key)
12
14
  result_data[result_key] = @object
13
15
  end
14
16
 
17
+ #: (?untyped obj) -> void
15
18
  def initialize(obj = nil)
16
- @object = obj
19
+ @object = obj #: untyped
17
20
  end
18
21
 
22
+ #: -> untyped
19
23
  def resolve
20
24
  @object
21
25
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
- # typed: true
2
+ #--
3
+ # typed: strict
3
4
 
4
5
  module GraphQL
5
6
  module Execution
@@ -14,6 +15,7 @@ module GraphQL
14
15
  #
15
16
  # :call-seq:
16
17
  # resolve_all(results, dataloader) -> void
18
+ #: (Array[untyped] results, GraphQL::Dataloader dataloader) -> nil
17
19
  def self.resolve_all(results, dataloader)
18
20
  backtrace = caller(1, 5) #: as !nil
19
21
  warn "#{self}.#{__method__} is deprecated; Use `dataloader.run` instead.#{backtrace.map { |l| "\n #{l}"}.join}"
@@ -22,6 +24,7 @@ module GraphQL
22
24
  end
23
25
 
24
26
  # **Deprecated:** Call `dataloader.run` instead
27
+ #: (Hash[Integer, Array[GraphQL::Execution::Lazy]] lazies_at_depth, GraphQL::Dataloader dataloader) -> nil
25
28
  def self.resolve_each_depth(lazies_at_depth, dataloader)
26
29
  backtrace = caller(1, 5) #: as !nil
27
30
  warn "#{self}.#{__method__} is deprecated; Use `dataloader.run` instead.#{backtrace.map { |l| "\n #{l}"}.join}"
@@ -35,7 +38,7 @@ module GraphQL
35
38
  end
36
39
 
37
40
  if smallest_depth
38
- lazies = lazies_at_depth.delete(smallest_depth)
41
+ lazies = lazies_at_depth.delete(smallest_depth) #: as !nil
39
42
  if !lazies.empty?
40
43
  lazies.each do |l|
41
44
  dataloader.append_job { l.value }
@@ -49,6 +52,7 @@ module GraphQL
49
52
  end
50
53
 
51
54
  # **Deprecated:** Call `dataloader.run` instead
55
+ #: (Array[untyped] results, GraphQL::Dataloader dataloader) -> nil
52
56
  def self.resolve(results, dataloader)
53
57
  backtrace = caller(1, 5) #: as !nil
54
58
  warn "#{self}.#{__method__} is deprecated; Use `dataloader.run` instead.#{backtrace.map { |l| "\n #{l}"}.join}"