graphql 2.6.14 → 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.
- checksums.yaml +4 -4
- data/lib/generators/graphql/core.rb +1 -0
- data/lib/generators/graphql/detailed_trace_generator.rb +1 -0
- data/lib/generators/graphql/enum_generator.rb +1 -0
- data/lib/generators/graphql/field_extractor.rb +1 -0
- data/lib/generators/graphql/input_generator.rb +1 -0
- data/lib/generators/graphql/install/mutation_root_generator.rb +1 -0
- data/lib/generators/graphql/install_generator.rb +1 -0
- data/lib/generators/graphql/interface_generator.rb +1 -0
- data/lib/generators/graphql/loader_generator.rb +1 -0
- data/lib/generators/graphql/mutation_create_generator.rb +1 -0
- data/lib/generators/graphql/mutation_delete_generator.rb +1 -0
- data/lib/generators/graphql/mutation_generator.rb +1 -0
- data/lib/generators/graphql/mutation_update_generator.rb +1 -0
- data/lib/generators/graphql/object_generator.rb +1 -0
- data/lib/generators/graphql/orm_mutations_base.rb +1 -0
- data/lib/generators/graphql/relay.rb +1 -0
- data/lib/generators/graphql/relay_generator.rb +1 -0
- data/lib/generators/graphql/scalar_generator.rb +1 -0
- data/lib/generators/graphql/templates/graphql_controller.erb +7 -1
- data/lib/generators/graphql/type_generator.rb +1 -0
- data/lib/generators/graphql/union_generator.rb +1 -0
- data/lib/graphql/analysis/analyzer.rb +1 -0
- data/lib/graphql/analysis/field_usage.rb +1 -0
- data/lib/graphql/analysis/max_query_complexity.rb +3 -1
- data/lib/graphql/analysis/max_query_depth.rb +3 -1
- data/lib/graphql/analysis/query_complexity.rb +7 -2
- data/lib/graphql/analysis/query_depth.rb +2 -1
- data/lib/graphql/analysis/visitor.rb +15 -2
- data/lib/graphql/analysis.rb +5 -5
- data/lib/graphql/analysis_error.rb +2 -1
- data/lib/graphql/autoload.rb +1 -0
- data/lib/graphql/backtrace/table.rb +1 -0
- data/lib/graphql/backtrace/traced_error.rb +1 -0
- data/lib/graphql/backtrace.rb +1 -0
- data/lib/graphql/coercion_error.rb +2 -1
- data/lib/graphql/current.rb +6 -1
- data/lib/graphql/dashboard/application_controller.rb +1 -0
- data/lib/graphql/dashboard/detailed_traces.rb +1 -0
- data/lib/graphql/dashboard/installable.rb +1 -0
- data/lib/graphql/dashboard/landings_controller.rb +1 -0
- data/lib/graphql/dashboard/limiters.rb +1 -0
- data/lib/graphql/dashboard/operation_store.rb +1 -0
- data/lib/graphql/dashboard/statics_controller.rb +1 -0
- data/lib/graphql/dashboard/subscriptions.rb +1 -0
- data/lib/graphql/dashboard.rb +2 -1
- data/lib/graphql/dataloader/active_record_association_source.rb +1 -0
- data/lib/graphql/dataloader/active_record_source.rb +1 -0
- data/lib/graphql/dataloader/async_dataloader.rb +1 -0
- data/lib/graphql/dataloader/null_dataloader.rb +1 -0
- data/lib/graphql/dataloader/request.rb +1 -0
- data/lib/graphql/dataloader/request_all.rb +1 -0
- data/lib/graphql/dataloader/source.rb +1 -0
- data/lib/graphql/dataloader.rb +1 -0
- data/lib/graphql/date_encoding_error.rb +4 -1
- data/lib/graphql/dig.rb +1 -0
- data/lib/graphql/duration_encoding_error.rb +4 -1
- data/lib/graphql/execution/directive_checks.rb +3 -1
- data/lib/graphql/execution/errors.rb +19 -7
- data/lib/graphql/execution/field_resolve_step.rb +4 -3
- data/lib/graphql/execution/finalize.rb +1 -0
- data/lib/graphql/execution/input_values.rb +196 -120
- data/lib/graphql/execution/interpreter/argument_value.rb +1 -0
- data/lib/graphql/execution/interpreter/arguments.rb +1 -0
- data/lib/graphql/execution/interpreter/arguments_cache.rb +1 -0
- data/lib/graphql/execution/interpreter/execution_errors.rb +7 -4
- data/lib/graphql/execution/interpreter/handles_raw_value.rb +6 -2
- data/lib/graphql/execution/interpreter/resolve.rb +6 -2
- data/lib/graphql/execution/interpreter/runtime/graphql_result.rb +1 -0
- data/lib/graphql/execution/interpreter/runtime.rb +14 -8
- data/lib/graphql/execution/interpreter.rb +7 -4
- data/lib/graphql/execution/lazy/lazy_method_map.rb +1 -0
- data/lib/graphql/execution/lazy.rb +1 -0
- data/lib/graphql/execution/load_argument_step.rb +1 -0
- data/lib/graphql/execution/lookahead.rb +21 -8
- data/lib/graphql/execution/multiplex.rb +1 -0
- data/lib/graphql/execution/next.rb +2 -0
- data/lib/graphql/execution/prepare_object_step.rb +3 -5
- data/lib/graphql/execution/resolve_type_step.rb +1 -0
- data/lib/graphql/execution/runner.rb +21 -12
- data/lib/graphql/execution/selections_step.rb +2 -1
- data/lib/graphql/execution/variable_values.rb +262 -0
- data/lib/graphql/execution.rb +1 -0
- data/lib/graphql/execution_error.rb +1 -0
- data/lib/graphql/float_decoding_error.rb +4 -1
- data/lib/graphql/float_encoding_error.rb +1 -0
- data/lib/graphql/integer_decoding_error.rb +4 -1
- data/lib/graphql/integer_encoding_error.rb +1 -0
- data/lib/graphql/introspection/base_object.rb +2 -1
- data/lib/graphql/introspection/directive_location_enum.rb +2 -1
- data/lib/graphql/introspection/directive_type.rb +4 -1
- data/lib/graphql/introspection/dynamic_fields.rb +4 -1
- data/lib/graphql/introspection/entry_points.rb +1 -0
- data/lib/graphql/introspection/enum_value_type.rb +4 -1
- data/lib/graphql/introspection/field_type.rb +6 -1
- data/lib/graphql/introspection/input_value_type.rb +1 -0
- data/lib/graphql/introspection/introspection_query.rb +10 -7
- data/lib/graphql/introspection/schema_type.rb +1 -0
- data/lib/graphql/introspection/type_kind_enum.rb +2 -1
- data/lib/graphql/introspection/type_type.rb +1 -0
- data/lib/graphql/introspection.rb +3 -1
- data/lib/graphql/invalid_name_error.rb +1 -0
- data/lib/graphql/invalid_null_error.rb +1 -0
- data/lib/graphql/language/block_string.rb +12 -5
- data/lib/graphql/language/cache.rb +1 -0
- data/lib/graphql/language/comment.rb +3 -1
- data/lib/graphql/language/definition_slice.rb +1 -0
- data/lib/graphql/language/document_from_schema_definition.rb +1 -0
- data/lib/graphql/language/generation.rb +3 -1
- data/lib/graphql/language/lexer.rb +33 -25
- data/lib/graphql/language/nodes.rb +1 -0
- data/lib/graphql/language/parser.rb +11 -7
- data/lib/graphql/language/printer.rb +1 -0
- data/lib/graphql/language/sanitized_printer.rb +1 -0
- data/lib/graphql/language/static_visitor.rb +1 -0
- data/lib/graphql/language/visitor.rb +1 -0
- data/lib/graphql/language.rb +2 -1
- data/lib/graphql/load_application_object_failed_error.rb +1 -0
- data/lib/graphql/name_validator.rb +3 -1
- data/lib/graphql/pagination/active_record_relation_connection.rb +9 -1
- data/lib/graphql/pagination/array_connection.rb +1 -0
- data/lib/graphql/pagination/connection.rb +1 -0
- data/lib/graphql/pagination/connections.rb +1 -0
- data/lib/graphql/pagination/mongoid_relation_connection.rb +6 -1
- data/lib/graphql/pagination/relation_connection.rb +5 -4
- data/lib/graphql/pagination/sequel_dataset_connection.rb +6 -1
- data/lib/graphql/pagination.rb +2 -1
- data/lib/graphql/parse_error.rb +1 -0
- data/lib/graphql/query/context/scoped_context.rb +1 -0
- data/lib/graphql/query/context.rb +1 -0
- data/lib/graphql/query/fingerprint.rb +3 -1
- data/lib/graphql/query/input_validation_result.rb +44 -0
- data/lib/graphql/query/null_context.rb +1 -0
- data/lib/graphql/query/partial.rb +5 -0
- data/lib/graphql/query/result.rb +1 -0
- data/lib/graphql/query/validation_pipeline.rb +1 -0
- data/lib/graphql/query/variable_validation_error.rb +1 -0
- data/lib/graphql/query.rb +9 -12
- data/lib/graphql/railtie.rb +2 -1
- data/lib/graphql/rake_task/validate.rb +1 -0
- data/lib/graphql/rake_task.rb +1 -0
- data/lib/graphql/relay/range_add.rb +1 -0
- data/lib/graphql/relay.rb +2 -1
- data/lib/graphql/rubocop/graphql/base_cop.rb +1 -0
- data/lib/graphql/rubocop/graphql/default_null_true.rb +1 -0
- data/lib/graphql/rubocop/graphql/default_required_true.rb +1 -0
- data/lib/graphql/rubocop/graphql/field_type_in_block.rb +1 -0
- data/lib/graphql/rubocop/graphql/root_types_in_block.rb +1 -0
- data/lib/graphql/rubocop.rb +2 -1
- data/lib/graphql/runtime_error.rb +2 -1
- data/lib/graphql/runtime_type_error.rb +2 -1
- data/lib/graphql/schema/addition.rb +1 -0
- data/lib/graphql/schema/always_visible.rb +4 -1
- data/lib/graphql/schema/argument.rb +1 -0
- data/lib/graphql/schema/base_64_encoder.rb +4 -1
- data/lib/graphql/schema/build_from_definition/resolve_map/default_resolve.rb +6 -3
- data/lib/graphql/schema/build_from_definition/resolve_map.rb +1 -0
- data/lib/graphql/schema/build_from_definition.rb +1 -0
- data/lib/graphql/schema/built_in_types.rb +3 -2
- data/lib/graphql/schema/directive/deprecated.rb +2 -1
- data/lib/graphql/schema/directive/feature.rb +1 -0
- data/lib/graphql/schema/directive/flagged.rb +5 -1
- data/lib/graphql/schema/directive/include.rb +3 -1
- data/lib/graphql/schema/directive/one_of.rb +5 -2
- data/lib/graphql/schema/directive/skip.rb +3 -1
- data/lib/graphql/schema/directive/specified_by.rb +2 -1
- data/lib/graphql/schema/directive/transform.rb +9 -4
- data/lib/graphql/schema/directive.rb +1 -0
- data/lib/graphql/schema/enum.rb +1 -0
- data/lib/graphql/schema/enum_value.rb +1 -0
- data/lib/graphql/schema/field/connection_extension.rb +6 -2
- data/lib/graphql/schema/field/scope_extension.rb +3 -1
- data/lib/graphql/schema/field.rb +4 -0
- data/lib/graphql/schema/field_extension.rb +1 -0
- data/lib/graphql/schema/find_inherited_value.rb +6 -1
- data/lib/graphql/schema/finder.rb +1 -0
- data/lib/graphql/schema/has_single_input_argument.rb +1 -0
- data/lib/graphql/schema/input_object.rb +1 -0
- data/lib/graphql/schema/interface.rb +1 -0
- data/lib/graphql/schema/introspection_system.rb +1 -0
- data/lib/graphql/schema/late_bound_type.rb +1 -0
- data/lib/graphql/schema/list.rb +1 -0
- data/lib/graphql/schema/loader.rb +1 -0
- data/lib/graphql/schema/member/base_dsl_methods.rb +1 -0
- data/lib/graphql/schema/member/build_type.rb +1 -0
- data/lib/graphql/schema/member/graphql_type_names.rb +2 -1
- data/lib/graphql/schema/member/has_arguments.rb +1 -0
- data/lib/graphql/schema/member/has_ast_node.rb +7 -2
- data/lib/graphql/schema/member/has_authorization.rb +7 -4
- data/lib/graphql/schema/member/has_dataloader.rb +1 -0
- data/lib/graphql/schema/member/has_deprecation_reason.rb +7 -2
- data/lib/graphql/schema/member/has_directives.rb +21 -22
- data/lib/graphql/schema/member/has_fields.rb +1 -0
- data/lib/graphql/schema/member/has_interfaces.rb +1 -0
- data/lib/graphql/schema/member/has_path.rb +3 -1
- data/lib/graphql/schema/member/has_unresolved_type_error.rb +3 -1
- data/lib/graphql/schema/member/has_validators.rb +1 -0
- data/lib/graphql/schema/member/relay_shortcuts.rb +1 -0
- data/lib/graphql/schema/member/scoped.rb +7 -3
- data/lib/graphql/schema/member/type_system_helpers.rb +1 -0
- data/lib/graphql/schema/member/validates_input.rb +7 -1
- data/lib/graphql/schema/member.rb +4 -2
- data/lib/graphql/schema/mutation.rb +7 -1
- data/lib/graphql/schema/non_null.rb +1 -0
- data/lib/graphql/schema/object.rb +2 -1
- data/lib/graphql/schema/printer.rb +1 -0
- data/lib/graphql/schema/ractor_shareable.rb +1 -0
- data/lib/graphql/schema/relay_classic_mutation.rb +8 -3
- data/lib/graphql/schema/resolver/has_payload_type.rb +1 -0
- data/lib/graphql/schema/resolver.rb +5 -3
- data/lib/graphql/schema/scalar.rb +27 -3
- data/lib/graphql/schema/subscription.rb +1 -0
- data/lib/graphql/schema/timeout.rb +1 -0
- data/lib/graphql/schema/type_expression.rb +4 -1
- data/lib/graphql/schema/type_membership.rb +1 -0
- data/lib/graphql/schema/union.rb +1 -0
- data/lib/graphql/schema/unique_within_type.rb +1 -0
- data/lib/graphql/schema/validator/all_validator.rb +7 -3
- data/lib/graphql/schema/validator/allow_blank_validator.rb +5 -2
- data/lib/graphql/schema/validator/allow_null_validator.rb +6 -3
- data/lib/graphql/schema/validator/exclusion_validator.rb +7 -4
- data/lib/graphql/schema/validator/format_validator.rb +7 -4
- data/lib/graphql/schema/validator/inclusion_validator.rb +6 -3
- data/lib/graphql/schema/validator/length_validator.rb +1 -0
- data/lib/graphql/schema/validator/numericality_validator.rb +1 -0
- data/lib/graphql/schema/validator/required_validator.rb +1 -0
- data/lib/graphql/schema/validator.rb +3 -2
- data/lib/graphql/schema/visibility/migration.rb +1 -0
- data/lib/graphql/schema/visibility/profile.rb +1 -0
- data/lib/graphql/schema/visibility/visit.rb +1 -0
- data/lib/graphql/schema/visibility.rb +1 -0
- data/lib/graphql/schema/warden.rb +1 -0
- data/lib/graphql/schema/wrapper.rb +1 -0
- data/lib/graphql/schema.rb +1 -0
- data/lib/graphql/static_validation/all_rules.rb +2 -1
- data/lib/graphql/static_validation/base_visitor.rb +126 -53
- data/lib/graphql/static_validation/definition_dependencies.rb +15 -2
- data/lib/graphql/static_validation/error.rb +14 -5
- data/lib/graphql/static_validation/interpreter_visitor.rb +2 -1
- data/lib/graphql/static_validation/rules/argument_literals_are_compatible.rb +9 -3
- data/lib/graphql/static_validation/rules/argument_literals_are_compatible_error.rb +16 -8
- data/lib/graphql/static_validation/rules/argument_names_are_unique.rb +5 -1
- data/lib/graphql/static_validation/rules/argument_names_are_unique_error.rb +8 -3
- data/lib/graphql/static_validation/rules/arguments_are_defined.rb +10 -4
- data/lib/graphql/static_validation/rules/arguments_are_defined_error.rb +14 -6
- data/lib/graphql/static_validation/rules/directives_are_defined.rb +7 -9
- data/lib/graphql/static_validation/rules/directives_are_defined_error.rb +8 -3
- data/lib/graphql/static_validation/rules/directives_are_in_valid_locations.rb +14 -7
- data/lib/graphql/static_validation/rules/directives_are_in_valid_locations_error.rb +10 -4
- data/lib/graphql/static_validation/rules/fields_are_defined_on_type.rb +9 -4
- data/lib/graphql/static_validation/rules/fields_are_defined_on_type_error.rb +10 -4
- data/lib/graphql/static_validation/rules/fields_have_appropriate_selections.rb +1 -0
- data/lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb +10 -4
- data/lib/graphql/static_validation/rules/fields_will_merge.rb +2 -3
- data/lib/graphql/static_validation/rules/fields_will_merge_error.rb +15 -4
- data/lib/graphql/static_validation/rules/fragment_names_are_unique.rb +10 -5
- data/lib/graphql/static_validation/rules/fragment_names_are_unique_error.rb +8 -3
- data/lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb +30 -14
- data/lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb +12 -5
- data/lib/graphql/static_validation/rules/fragment_types_exist.rb +11 -6
- data/lib/graphql/static_validation/rules/fragment_types_exist_error.rb +8 -3
- data/lib/graphql/static_validation/rules/fragments_are_finite.rb +3 -1
- data/lib/graphql/static_validation/rules/fragments_are_finite_error.rb +8 -3
- data/lib/graphql/static_validation/rules/fragments_are_named.rb +3 -1
- data/lib/graphql/static_validation/rules/fragments_are_named_error.rb +5 -1
- data/lib/graphql/static_validation/rules/fragments_are_on_composite_types.rb +7 -3
- data/lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb +8 -4
- data/lib/graphql/static_validation/rules/fragments_are_used.rb +3 -1
- data/lib/graphql/static_validation/rules/fragments_are_used_error.rb +8 -3
- data/lib/graphql/static_validation/rules/input_object_names_are_unique.rb +4 -1
- data/lib/graphql/static_validation/rules/input_object_names_are_unique_error.rb +8 -3
- data/lib/graphql/static_validation/rules/mutation_root_exists.rb +4 -2
- data/lib/graphql/static_validation/rules/mutation_root_exists_error.rb +5 -1
- data/lib/graphql/static_validation/rules/no_definitions_are_present.rb +7 -3
- data/lib/graphql/static_validation/rules/no_definitions_are_present_error.rb +5 -1
- data/lib/graphql/static_validation/rules/not_single_subscription_error.rb +5 -1
- data/lib/graphql/static_validation/rules/one_of_input_objects_are_valid.rb +19 -6
- data/lib/graphql/static_validation/rules/one_of_input_objects_are_valid_error.rb +7 -2
- data/lib/graphql/static_validation/rules/operation_names_are_valid.rb +10 -4
- data/lib/graphql/static_validation/rules/operation_names_are_valid_error.rb +7 -2
- data/lib/graphql/static_validation/rules/query_root_exists.rb +4 -2
- data/lib/graphql/static_validation/rules/query_root_exists_error.rb +5 -1
- data/lib/graphql/static_validation/rules/required_arguments_are_present.rb +19 -10
- data/lib/graphql/static_validation/rules/required_arguments_are_present_error.rb +12 -5
- data/lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb +5 -1
- data/lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb +11 -4
- data/lib/graphql/static_validation/rules/subscription_root_exists_and_single_subscription_selection.rb +9 -6
- data/lib/graphql/static_validation/rules/subscription_root_exists_error.rb +5 -1
- data/lib/graphql/static_validation/rules/unique_directives_per_location.rb +7 -5
- data/lib/graphql/static_validation/rules/unique_directives_per_location_error.rb +8 -3
- data/lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed.rb +3 -1
- data/lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed_error.rb +13 -6
- data/lib/graphql/static_validation/rules/variable_names_are_unique.rb +3 -1
- data/lib/graphql/static_validation/rules/variable_names_are_unique_error.rb +8 -3
- data/lib/graphql/static_validation/rules/variable_usages_are_allowed.rb +17 -9
- data/lib/graphql/static_validation/rules/variable_usages_are_allowed_error.rb +14 -6
- data/lib/graphql/static_validation/rules/variables_are_input_types.rb +9 -6
- data/lib/graphql/static_validation/rules/variables_are_input_types_error.rb +10 -4
- data/lib/graphql/static_validation/rules/variables_are_used_and_defined.rb +1 -0
- data/lib/graphql/static_validation/rules/variables_are_used_and_defined_error.rb +11 -5
- data/lib/graphql/static_validation/validation_context.rb +52 -14
- data/lib/graphql/static_validation/validation_timeout_error.rb +5 -1
- data/lib/graphql/static_validation/validator.rb +7 -3
- data/lib/graphql/static_validation.rb +2 -2
- data/lib/graphql/string_encoding_error.rb +1 -0
- data/lib/graphql/subscriptions/action_cable_subscriptions.rb +15 -13
- data/lib/graphql/subscriptions/broadcast_analyzer.rb +1 -0
- data/lib/graphql/subscriptions/default_subscription_resolve_extension.rb +1 -0
- data/lib/graphql/subscriptions/event.rb +1 -0
- data/lib/graphql/subscriptions/serialize.rb +1 -0
- data/lib/graphql/subscriptions.rb +1 -0
- data/lib/graphql/testing/helpers.rb +1 -0
- data/lib/graphql/testing/mock_action_cable.rb +1 -0
- data/lib/graphql/testing.rb +2 -1
- data/lib/graphql/tracing/active_support_notifications_trace.rb +1 -0
- data/lib/graphql/tracing/active_support_notifications_tracing.rb +1 -0
- data/lib/graphql/tracing/appoptics_trace.rb +1 -0
- data/lib/graphql/tracing/appoptics_tracing.rb +1 -0
- data/lib/graphql/tracing/appsignal_trace.rb +1 -0
- data/lib/graphql/tracing/appsignal_tracing.rb +1 -0
- data/lib/graphql/tracing/call_legacy_tracers.rb +1 -0
- data/lib/graphql/tracing/data_dog_trace.rb +1 -0
- data/lib/graphql/tracing/data_dog_tracing.rb +1 -0
- data/lib/graphql/tracing/detailed_trace/active_record_backend.rb +1 -0
- data/lib/graphql/tracing/detailed_trace/memory_backend.rb +1 -0
- data/lib/graphql/tracing/detailed_trace/redis_backend.rb +1 -0
- data/lib/graphql/tracing/detailed_trace.rb +1 -0
- data/lib/graphql/tracing/legacy_hooks_trace.rb +1 -0
- data/lib/graphql/tracing/legacy_trace.rb +2 -1
- data/lib/graphql/tracing/monitor_trace.rb +1 -0
- data/lib/graphql/tracing/new_relic_trace.rb +1 -0
- data/lib/graphql/tracing/new_relic_tracing.rb +1 -0
- data/lib/graphql/tracing/notifications_trace.rb +1 -0
- data/lib/graphql/tracing/notifications_tracing.rb +1 -0
- data/lib/graphql/tracing/null_trace.rb +2 -1
- data/lib/graphql/tracing/perfetto_trace/trace_pb.rb +1 -0
- data/lib/graphql/tracing/perfetto_trace.rb +1 -0
- data/lib/graphql/tracing/platform_trace.rb +1 -0
- data/lib/graphql/tracing/platform_tracing.rb +1 -0
- data/lib/graphql/tracing/prometheus_trace/graphql_collector.rb +1 -0
- data/lib/graphql/tracing/prometheus_trace.rb +1 -0
- data/lib/graphql/tracing/prometheus_tracing.rb +1 -0
- data/lib/graphql/tracing/scout_trace.rb +1 -0
- data/lib/graphql/tracing/scout_tracing.rb +1 -0
- data/lib/graphql/tracing/sentry_trace.rb +1 -0
- data/lib/graphql/tracing/statsd_trace.rb +1 -0
- data/lib/graphql/tracing/statsd_tracing.rb +1 -0
- data/lib/graphql/tracing/trace.rb +1 -0
- data/lib/graphql/tracing.rb +1 -0
- data/lib/graphql/type_kinds.rb +1 -0
- data/lib/graphql/types/big_int.rb +5 -1
- data/lib/graphql/types/boolean.rb +4 -1
- data/lib/graphql/types/float.rb +4 -1
- data/lib/graphql/types/id.rb +4 -1
- data/lib/graphql/types/int.rb +6 -3
- data/lib/graphql/types/iso_8601_date.rb +4 -1
- data/lib/graphql/types/iso_8601_date_time.rb +7 -2
- data/lib/graphql/types/iso_8601_duration.rb +7 -2
- data/lib/graphql/types/json.rb +4 -1
- data/lib/graphql/types/relay/base_connection.rb +2 -1
- data/lib/graphql/types/relay/base_edge.rb +2 -1
- data/lib/graphql/types/relay/connection_behaviors.rb +1 -2
- data/lib/graphql/types/relay/edge_behaviors.rb +1 -2
- data/lib/graphql/types/relay/has_node_field.rb +7 -1
- data/lib/graphql/types/relay/has_nodes_field.rb +7 -1
- data/lib/graphql/types/relay/node.rb +2 -1
- data/lib/graphql/types/relay/node_behaviors.rb +7 -1
- data/lib/graphql/types/relay/page_info.rb +2 -1
- data/lib/graphql/types/relay/page_info_behaviors.rb +5 -1
- data/lib/graphql/types/relay.rb +2 -1
- data/lib/graphql/types/string.rb +4 -1
- data/lib/graphql/types.rb +2 -1
- data/lib/graphql/unauthorized_enum_value_error.rb +1 -0
- data/lib/graphql/unauthorized_error.rb +1 -0
- data/lib/graphql/unauthorized_field_error.rb +1 -0
- data/lib/graphql/unresolved_type_error.rb +1 -0
- data/lib/graphql/version.rb +3 -2
- data/lib/graphql.rb +1 -0
- metadata +3 -4
- data/lib/graphql/query/variables.rb +0 -99
- data/lib/graphql/static_validation/literal_validator.rb +0 -157
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
module GraphQL
|
|
4
5
|
class Schema
|
|
5
6
|
class Directive < GraphQL::Schema::Member
|
|
@@ -8,13 +9,15 @@ module GraphQL
|
|
|
8
9
|
locations(GraphQL::Schema::Directive::INPUT_OBJECT)
|
|
9
10
|
default_directive true
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
#: (singleton(GraphQL::Schema::InputObject) owner, **untyped arguments) -> void
|
|
13
|
+
def initialize(owner, **arguments)
|
|
12
14
|
super
|
|
13
15
|
|
|
14
16
|
owner.extend(IsOneOf)
|
|
15
17
|
end
|
|
16
18
|
|
|
17
19
|
module IsOneOf
|
|
20
|
+
#: -> bool
|
|
18
21
|
def one_of?
|
|
19
22
|
true
|
|
20
23
|
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
module GraphQL
|
|
4
5
|
class Schema
|
|
5
6
|
class Directive < GraphQL::Schema::Member
|
|
@@ -17,6 +18,7 @@ module GraphQL
|
|
|
17
18
|
|
|
18
19
|
default_directive true
|
|
19
20
|
|
|
21
|
+
#: (Hash[Symbol, untyped] args, GraphQL::Query::Context ctx) -> bool
|
|
20
22
|
def self.static_include?(args, ctx)
|
|
21
23
|
!args[:if]
|
|
22
24
|
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
module GraphQL
|
|
4
5
|
class Schema
|
|
5
6
|
class Directive < GraphQL::Schema::Member
|
|
@@ -40,9 +41,10 @@ module GraphQL
|
|
|
40
41
|
"upcase",
|
|
41
42
|
"downcase",
|
|
42
43
|
# ??
|
|
43
|
-
]
|
|
44
|
+
] #: Array[String]
|
|
44
45
|
# Implement the Directive API
|
|
45
|
-
|
|
46
|
+
#: (untyped object, Hash[Symbol, untyped] arguments, GraphQL::Query::Context context) { () -> untyped } -> nil
|
|
47
|
+
def self.resolve(object, arguments, context, &block)
|
|
46
48
|
path = context.namespace(:interpreter)[:current_path]
|
|
47
49
|
return_value = yield
|
|
48
50
|
transform_name = arguments[:by]
|
|
@@ -64,6 +66,7 @@ module GraphQL
|
|
|
64
66
|
end
|
|
65
67
|
end
|
|
66
68
|
|
|
69
|
+
#: (Array[GraphQL::Language::Nodes::Field] ast_nodes, untyped parent_type, GraphQL::Schema::Field field_defn, Array[untyped] objects, Hash[Symbol, untyped] arguments, GraphQL::Query::Context context) -> Transformer?
|
|
67
70
|
def self.resolve_field(ast_nodes, parent_type, field_defn, objects, arguments, context)
|
|
68
71
|
transform_name = arguments[:by]
|
|
69
72
|
if TRANSFORMS.include?(transform_name)
|
|
@@ -75,9 +78,11 @@ module GraphQL
|
|
|
75
78
|
|
|
76
79
|
class Transformer
|
|
77
80
|
include Execution::PostProcessor
|
|
81
|
+
#: (String transform) -> void
|
|
78
82
|
def initialize(transform)
|
|
79
|
-
@transform = transform
|
|
83
|
+
@transform = transform #: String
|
|
80
84
|
end
|
|
85
|
+
#: (Array[untyped] field_results) -> Array[untyped]
|
|
81
86
|
def after_resolve(field_results)
|
|
82
87
|
field_results.map! { |r| r.respond_to?(@transform) ? r.public_send(@transform) : r }
|
|
83
88
|
field_results
|
data/lib/graphql/schema/enum.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
|
|
4
5
|
module GraphQL
|
|
5
6
|
class Schema
|
|
@@ -7,6 +8,7 @@ module GraphQL
|
|
|
7
8
|
class ConnectionExtension < GraphQL::Schema::FieldExtension
|
|
8
9
|
extras [:lookahead]
|
|
9
10
|
|
|
11
|
+
#: -> void
|
|
10
12
|
def apply
|
|
11
13
|
field.argument :after, "String", "Returns the elements in the list that come after the specified cursor.", required: false
|
|
12
14
|
field.argument :before, "String", "Returns the elements in the list that come before the specified cursor.", required: false
|
|
@@ -15,7 +17,8 @@ module GraphQL
|
|
|
15
17
|
end
|
|
16
18
|
|
|
17
19
|
# Remove pagination args before passing it to a user method
|
|
18
|
-
|
|
20
|
+
#: (arguments: Hash[Symbol, untyped], context: GraphQL::Query::Context, ?object: untyped, ?objects: untyped) { (untyped, Hash[Symbol, untyped], Hash[Symbol, untyped]) -> untyped } -> untyped
|
|
21
|
+
def resolve(arguments:, context:, object: nil, objects: nil, &block)
|
|
19
22
|
next_args = arguments.dup
|
|
20
23
|
next_args.delete(:first)
|
|
21
24
|
next_args.delete(:last)
|
|
@@ -26,6 +29,7 @@ module GraphQL
|
|
|
26
29
|
yield(object || objects, next_args, original_arguments)
|
|
27
30
|
end
|
|
28
31
|
|
|
32
|
+
#: (value: untyped, object: untyped, arguments: Hash[Symbol, untyped], context: GraphQL::Query::Context, memo: untyped) -> untyped
|
|
29
33
|
def after_resolve(value:, object:, arguments:, context:, memo:)
|
|
30
34
|
original_arguments = memo
|
|
31
35
|
lookahead = arguments[:lookahead]
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
|
|
4
5
|
module GraphQL
|
|
5
6
|
class Schema
|
|
6
7
|
class Field
|
|
7
8
|
class ScopeExtension < GraphQL::Schema::FieldExtension
|
|
9
|
+
#: (object: untyped, arguments: Hash[Symbol, untyped], context: GraphQL::Query::Context, value: untyped, memo: untyped) -> untyped
|
|
8
10
|
def after_resolve(object:, arguments:, context:, value:, memo:)
|
|
9
11
|
if object.is_a?(GraphQL::Schema::Object)
|
|
10
12
|
if value.nil?
|
data/lib/graphql/schema/field.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
#--
|
|
2
3
|
# typed: true
|
|
3
4
|
require "graphql/schema/field/connection_extension"
|
|
4
5
|
require "graphql/schema/field/scope_extension"
|
|
@@ -987,6 +988,9 @@ module GraphQL
|
|
|
987
988
|
|
|
988
989
|
if max_possible_page_size.nil?
|
|
989
990
|
max_possible_page_size = default_page_size || query.schema.default_page_size || max_page_size || query.schema.default_max_page_size
|
|
991
|
+
elsif max_possible_page_size < 0
|
|
992
|
+
# Pagination returns no items for a negative `first:` or `last:`, so it mustn't subtract from the total.
|
|
993
|
+
max_possible_page_size = 0
|
|
990
994
|
end
|
|
991
995
|
|
|
992
996
|
if max_possible_page_size.nil?
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
module GraphQL
|
|
4
5
|
class Schema
|
|
5
6
|
#--
|
|
6
7
|
# @requires_ancestor: Module
|
|
7
8
|
module FindInheritedValue
|
|
9
|
+
#: (Module[untyped] child_cls) -> void
|
|
8
10
|
def self.extended(child_cls)
|
|
9
11
|
child_cls.singleton_class.include(GraphQL::EmptyObjects)
|
|
10
12
|
end
|
|
11
13
|
|
|
14
|
+
#: (Module[untyped] child_cls) -> void
|
|
12
15
|
def self.included(child_cls)
|
|
13
16
|
child_cls.include(GraphQL::EmptyObjects)
|
|
14
17
|
end
|
|
15
18
|
|
|
16
19
|
private
|
|
17
20
|
|
|
21
|
+
# Returns whatever the inherited configuration method returns, so the result is `untyped`.
|
|
22
|
+
#: (Symbol method_name, ?untyped default_value) -> untyped
|
|
18
23
|
def find_inherited_value(method_name, default_value = nil)
|
|
19
24
|
if self.is_a?(Class)
|
|
20
25
|
superclass.respond_to?(method_name, true) ? superclass.send(method_name) : default_value
|
data/lib/graphql/schema/list.rb
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
module GraphQL
|
|
4
5
|
class Schema
|
|
5
6
|
class Member
|
|
6
7
|
module HasAstNode
|
|
8
|
+
#: (singleton(GraphQL::Schema::Member) | singleton(GraphQL::Schema) child_cls) -> void
|
|
7
9
|
def self.extended(child_cls)
|
|
8
10
|
super
|
|
9
11
|
child_cls.ast_node = nil
|
|
10
12
|
end
|
|
11
13
|
|
|
14
|
+
#: (singleton(GraphQL::Schema::Member) | singleton(GraphQL::Schema) child_cls) -> void
|
|
12
15
|
def inherited(child_cls)
|
|
13
16
|
super
|
|
14
17
|
child_cls.ast_node = nil
|
|
@@ -16,9 +19,10 @@ module GraphQL
|
|
|
16
19
|
|
|
17
20
|
# If this schema was parsed from a `.graphql` file (or other SDL),
|
|
18
21
|
# this is the AST node that defined this part of the schema.
|
|
22
|
+
#: (?GraphQL::Language::Nodes::AbstractNode? new_ast_node) -> GraphQL::Language::Nodes::AbstractNode?
|
|
19
23
|
def ast_node(new_ast_node = nil)
|
|
20
24
|
if new_ast_node
|
|
21
|
-
@ast_node = new_ast_node
|
|
25
|
+
@ast_node = new_ast_node #: GraphQL::Language::Nodes::AbstractNode?
|
|
22
26
|
elsif defined?(@ast_node)
|
|
23
27
|
@ast_node
|
|
24
28
|
else
|
|
@@ -26,6 +30,7 @@ module GraphQL
|
|
|
26
30
|
end
|
|
27
31
|
end
|
|
28
32
|
|
|
33
|
+
#: GraphQL::Language::Nodes::AbstractNode?
|
|
29
34
|
attr_writer :ast_node
|
|
30
35
|
end
|
|
31
36
|
end
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
module GraphQL
|
|
4
5
|
class Schema
|
|
5
6
|
class Member
|
|
6
7
|
module HasAuthorization
|
|
8
|
+
#: (Module[untyped] child_class) -> void
|
|
7
9
|
def self.included(child_class)
|
|
8
10
|
child_class.include(InstanceConfigured)
|
|
9
11
|
end
|
|
10
12
|
|
|
13
|
+
#: (Module[untyped] child_class) -> void
|
|
11
14
|
def self.extended(child_class)
|
|
12
15
|
child_class.extend(ClassConfigured)
|
|
13
|
-
child_class.class_exec do
|
|
14
|
-
@authorizes = false
|
|
15
|
-
end
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
#: (untyped object, GraphQL::Query::Context context) -> bool
|
|
18
19
|
def authorized?(object, context)
|
|
19
20
|
true
|
|
20
21
|
end
|
|
@@ -22,6 +23,7 @@ module GraphQL
|
|
|
22
23
|
#--
|
|
23
24
|
# @requires_ancestor: Kernel
|
|
24
25
|
module InstanceConfigured
|
|
26
|
+
#: (GraphQL::Query::Context context) -> bool
|
|
25
27
|
def authorizes?(context)
|
|
26
28
|
raise RequiredImplementationMissingError, "#{self.class} must implement #authorizes?(context)"
|
|
27
29
|
end
|
|
@@ -30,6 +32,7 @@ module GraphQL
|
|
|
30
32
|
#--
|
|
31
33
|
# @requires_ancestor: Kernel
|
|
32
34
|
module ClassConfigured
|
|
35
|
+
#: (GraphQL::Query::Context context) -> bool
|
|
33
36
|
def authorizes?(context)
|
|
34
37
|
method(:authorized?).owner != GraphQL::Schema::Member::HasAuthorization
|
|
35
38
|
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
|
|
4
5
|
module GraphQL
|
|
5
6
|
class Schema
|
|
@@ -10,6 +11,7 @@ module GraphQL
|
|
|
10
11
|
# **Returns**
|
|
11
12
|
#
|
|
12
13
|
# - `String, nil` — Explains why this member was deprecated (if present, this will be marked deprecated in introspection)
|
|
14
|
+
#: String?
|
|
13
15
|
attr_reader :deprecation_reason
|
|
14
16
|
|
|
15
17
|
# Set the deprecation reason for this member, or remove it by assigning `nil`
|
|
@@ -20,8 +22,9 @@ module GraphQL
|
|
|
20
22
|
#
|
|
21
23
|
# :call-seq:
|
|
22
24
|
# deprecation_reason=(String | nil text)
|
|
25
|
+
#: (String? text) -> void
|
|
23
26
|
def deprecation_reason=(text)
|
|
24
|
-
@deprecation_reason = text
|
|
27
|
+
@deprecation_reason = text #: String?
|
|
25
28
|
if text.nil?
|
|
26
29
|
remove_directive(GraphQL::Schema::Directive::Deprecated)
|
|
27
30
|
else
|
|
@@ -30,6 +33,7 @@ module GraphQL
|
|
|
30
33
|
end
|
|
31
34
|
end
|
|
32
35
|
|
|
36
|
+
#: (Module[untyped] child_class) -> void
|
|
33
37
|
def self.extended(child_class)
|
|
34
38
|
super
|
|
35
39
|
child_class.extend(ClassMethods)
|
|
@@ -38,6 +42,7 @@ module GraphQL
|
|
|
38
42
|
#--
|
|
39
43
|
# @requires_ancestor: GraphQL::Schema::Member::HasDeprecationReason
|
|
40
44
|
module ClassMethods
|
|
45
|
+
#: (?untyped new_reason) -> String?
|
|
41
46
|
def deprecation_reason(new_reason = NOT_CONFIGURED)
|
|
42
47
|
if NOT_CONFIGURED.equal?(new_reason)
|
|
43
48
|
super()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
#--
|
|
2
3
|
# typed: true
|
|
3
4
|
|
|
4
5
|
module GraphQL
|
|
@@ -91,32 +92,18 @@ module GraphQL
|
|
|
91
92
|
else
|
|
92
93
|
GraphQL::EmptyObjects::EMPTY_ARRAY
|
|
93
94
|
end
|
|
94
|
-
when Module
|
|
95
|
-
dirs = nil #: Array[GraphQL::Schema::Directive]?
|
|
96
|
-
ancestors = schema_member.ancestors #: Array[untyped]
|
|
97
|
-
ancestors.reverse_each do |ancestor|
|
|
98
|
-
if ancestor.respond_to?(:own_directives) &&
|
|
99
|
-
!(anc_dirs = ancestor.own_directives).empty?
|
|
100
|
-
dirs ||= []
|
|
101
|
-
merge_directives(dirs, anc_dirs)
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
if directives
|
|
105
|
-
dirs ||= []
|
|
106
|
-
merge_directives(dirs, directives)
|
|
107
|
-
end
|
|
108
|
-
dirs || GraphQL::EmptyObjects::EMPTY_ARRAY
|
|
109
95
|
when HasDirectives
|
|
110
96
|
directives || GraphQL::EmptyObjects::EMPTY_ARRAY
|
|
111
97
|
else
|
|
112
|
-
raise "Invariant: how could #{schema_member} not be a Class
|
|
98
|
+
raise "Invariant: how could #{schema_member} not be a Class or instance of HasDirectives?"
|
|
113
99
|
end
|
|
114
100
|
end
|
|
115
101
|
|
|
116
102
|
private
|
|
117
103
|
|
|
118
104
|
# Modify `target` by adding items from `dirs` such that:
|
|
119
|
-
# - Any name conflict is overridden by the incoming member of `dirs
|
|
105
|
+
# - Any name conflict is overridden by the incoming member(s) of `dirs`.
|
|
106
|
+
# (Repeatable directives replace _all_ same-named directives in `target`, and all incoming ones are kept.)
|
|
120
107
|
# - Any other member of `dirs` is appended
|
|
121
108
|
#
|
|
122
109
|
# **Parameters**
|
|
@@ -131,14 +118,26 @@ module GraphQL
|
|
|
131
118
|
# :call-seq:
|
|
132
119
|
# merge_directives(Array[GraphQL::Schema::Directive] target, Array[GraphQL::Schema::Directive] dirs) -> void
|
|
133
120
|
def merge_directives(target, dirs)
|
|
134
|
-
dirs.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
121
|
+
incoming = dirs.group_by(&:graphql_name)
|
|
122
|
+
merged = [] #: Array[GraphQL::Schema::Directive]
|
|
123
|
+
target.each do |d|
|
|
124
|
+
name = d.graphql_name
|
|
125
|
+
if incoming.key?(name)
|
|
126
|
+
# Put the incoming directive(s) where the first overridden one was
|
|
127
|
+
if (replacements = incoming[name])
|
|
128
|
+
merged.concat(replacements)
|
|
129
|
+
incoming[name] = nil
|
|
130
|
+
end
|
|
138
131
|
else
|
|
139
|
-
|
|
132
|
+
merged << d
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
dirs.each do |dir|
|
|
136
|
+
if incoming[dir.graphql_name]
|
|
137
|
+
merged << dir
|
|
140
138
|
end
|
|
141
139
|
end
|
|
140
|
+
target.replace(merged)
|
|
142
141
|
nil
|
|
143
142
|
end
|
|
144
143
|
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
|
|
4
5
|
module GraphQL
|
|
5
6
|
class Schema
|
|
@@ -13,6 +14,7 @@ module GraphQL
|
|
|
13
14
|
#
|
|
14
15
|
# :call-seq:
|
|
15
16
|
# path() -> String
|
|
17
|
+
#: -> String?
|
|
16
18
|
def path
|
|
17
19
|
member = self #: untyped
|
|
18
20
|
path_str = if member.respond_to?(:graphql_name)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
|
|
4
5
|
module GraphQL
|
|
5
6
|
class Schema
|
|
@@ -7,6 +8,7 @@ module GraphQL
|
|
|
7
8
|
# Set up a type-specific error to make debugging & bug tracker integration better
|
|
8
9
|
module HasUnresolvedTypeError
|
|
9
10
|
private
|
|
11
|
+
#: (Module[untyped] child_class) -> void
|
|
10
12
|
def add_unresolved_type_error(child_class)
|
|
11
13
|
if child_class.name # Don't set this for anonymous classes
|
|
12
14
|
child_class.const_set(:UnresolvedTypeError, Class.new(GraphQL::UnresolvedTypeError))
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
|
|
4
5
|
module GraphQL
|
|
5
6
|
class Schema
|
|
@@ -23,10 +24,12 @@ module GraphQL
|
|
|
23
24
|
#
|
|
24
25
|
# :call-seq:
|
|
25
26
|
# scope_items(Object items, GraphQL::Query::Context context) -> Object
|
|
27
|
+
#: (untyped items, GraphQL::Query::Context context) -> untyped
|
|
26
28
|
def scope_items(items, context)
|
|
27
29
|
items
|
|
28
30
|
end
|
|
29
31
|
|
|
32
|
+
#: (?bool? new_value) -> bool?
|
|
30
33
|
def reauthorize_scoped_objects(new_value = nil)
|
|
31
34
|
if new_value.nil?
|
|
32
35
|
if @reauthorize_scoped_objects != nil
|
|
@@ -35,14 +38,15 @@ module GraphQL
|
|
|
35
38
|
find_inherited_value(:reauthorize_scoped_objects, true)
|
|
36
39
|
end
|
|
37
40
|
else
|
|
38
|
-
@reauthorize_scoped_objects = new_value
|
|
41
|
+
@reauthorize_scoped_objects = new_value #: bool?
|
|
39
42
|
end
|
|
40
43
|
end
|
|
41
44
|
|
|
45
|
+
#: (Module[untyped] subclass) -> void
|
|
42
46
|
def inherited(subclass)
|
|
43
47
|
super
|
|
44
48
|
subclass.class_exec do
|
|
45
|
-
@reauthorize_scoped_objects = nil
|
|
49
|
+
@reauthorize_scoped_objects = nil #: bool?
|
|
46
50
|
end
|
|
47
51
|
end
|
|
48
52
|
end
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
2
|
+
#--
|
|
3
|
+
# typed: strict
|
|
3
4
|
|
|
4
5
|
module GraphQL
|
|
5
6
|
class Schema
|
|
6
7
|
class Member
|
|
7
8
|
module ValidatesInput
|
|
9
|
+
#: (untyped val, GraphQL::Query::Context ctx) -> bool
|
|
8
10
|
def valid_input?(val, ctx)
|
|
9
11
|
validate_input(val, ctx).valid?
|
|
10
12
|
end
|
|
11
13
|
|
|
14
|
+
#: (untyped val, GraphQL::Query::Context ctx, ?max_errors: Integer?) -> GraphQL::Query::InputValidationResult
|
|
12
15
|
def validate_input(val, ctx, max_errors: nil)
|
|
13
16
|
if val.nil?
|
|
14
17
|
Query::InputValidationResult::VALID
|
|
@@ -17,14 +20,17 @@ module GraphQL
|
|
|
17
20
|
end
|
|
18
21
|
end
|
|
19
22
|
|
|
23
|
+
#: (untyped v) -> bool
|
|
20
24
|
def valid_isolated_input?(v)
|
|
21
25
|
valid_input?(v, GraphQL::Query::NullContext.instance)
|
|
22
26
|
end
|
|
23
27
|
|
|
28
|
+
#: (untyped v) -> untyped
|
|
24
29
|
def coerce_isolated_input(v)
|
|
25
30
|
coerce_input(v, GraphQL::Query::NullContext.instance)
|
|
26
31
|
end
|
|
27
32
|
|
|
33
|
+
#: (untyped v) -> untyped
|
|
28
34
|
def coerce_isolated_result(v)
|
|
29
35
|
coerce_result(v, GraphQL::Query::NullContext.instance)
|
|
30
36
|
end
|