Module: GraphQL::Schema::HasSingleInputArgument

Included in:
RelayClassicMutation
Defined in:
lib/graphql/schema/has_single_input_argument.rb

Overview

-- @requires_ancestor: GraphQL::Schema::Resolver

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



19
20
21
# File 'lib/graphql/schema/has_single_input_argument.rb', line 19

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#call ⇒ Object



23
24
25
26
# File 'lib/graphql/schema/has_single_input_argument.rb', line 23

def call
  @prepared_arguments = flatten_arguments(@prepared_arguments)
  super
end

#resolve_with_support(**inputs) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/graphql/schema/has_single_input_argument.rb', line 10

def resolve_with_support(**inputs)
  input_kwargs = flatten_arguments(inputs)
  if !input_kwargs.empty?
    super(**input_kwargs)
  else
    super()
  end
end