Method: GraphQL::Schema::HasSingleInputArgument::ClassMethods#input_type

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

#input_type(new_input_type = nil) ⇒ Class

Returns The generated InputObject class for this mutation's input.

Parameters:

  • new_input_type (Class, nil) (defaults to: nil)

    If provided, it configures this mutation to accept new_input_type instead of generating an input type

Returns:

  • (Class)

    The generated InputObject class for this mutation's input



114
115
116
117
118
119
# File 'lib/graphql/schema/has_single_input_argument.rb', line 114

def input_type(new_input_type = nil)
  if new_input_type
    @input_type = new_input_type
  end
  @input_type ||= generate_input_type
end