Class: ActiveAdmin::GraphQL::RunActionMutationConfig
- Inherits:
-
Object
- Object
- ActiveAdmin::GraphQL::RunActionMutationConfig
- Defined in:
- lib/active_admin/graphql/run_action_mutation_config.rb
Overview
Pairs return type and optional resolver for one run-action mutation kind (batch, member, or collection). Default return type resolution falls back to ActiveAdmin::GraphQL::ResourceConfig#run_action_payload_type, then RunActionPayload.
Instance Attribute Summary collapse
-
#arguments_proc ⇒ Object
Optional block evaluated in the graphql-ruby
fieldDSL context (argument, …) for per-action fields. -
#authorize ⇒ Object
Optional authorization toggle for this mutation configuration.
-
#payload_type ⇒ Class?
GraphQL::Schema::Objectsubclass. - #resolve_proc ⇒ Proc?
Class Method Summary collapse
Instance Attribute Details
#arguments_proc ⇒ Object
Optional block evaluated in the graphql-ruby field DSL context (argument, …) for per-action fields.
14 15 16 |
# File 'lib/active_admin/graphql/run_action_mutation_config.rb', line 14 def arguments_proc @arguments_proc end |
#authorize ⇒ Object
Optional authorization toggle for this mutation configuration. nil means namespace default.
16 17 18 |
# File 'lib/active_admin/graphql/run_action_mutation_config.rb', line 16 def @authorize end |
#payload_type ⇒ Class?
Returns GraphQL::Schema::Object subclass.
10 11 12 |
# File 'lib/active_admin/graphql/run_action_mutation_config.rb', line 10 def payload_type @payload_type end |
#resolve_proc ⇒ Proc?
12 13 14 |
# File 'lib/active_admin/graphql/run_action_mutation_config.rb', line 12 def resolve_proc @resolve_proc end |
Class Method Details
.ensure_graphql_object_subclass!(type) ⇒ Object
18 19 20 21 22 |
# File 'lib/active_admin/graphql/run_action_mutation_config.rb', line 18 def self.ensure_graphql_object_subclass!(type) unless type.is_a?(Class) && type < ::GraphQL::Schema::Object raise ArgumentError, "Expected a GraphQL::Schema::Object subclass, got #{type.inspect}" end end |