Class: GraphQL::InputObjectType

Inherits:
BaseType
  • Object
show all
Defined in:
lib/graphql/input_object_type.rb

Overview

A complex input type for a field argument.

Examples:

An input type with name and number

PlayerInput = GraphQL::InputObjectType.define do
  name("Player")
  input_field :name, !types.String
  input_field :number, !types.Int
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseType

#==, #resolve_type, #to_s, #unwrap

Methods included from DefinitionHelpers::DefinedByConfig

included

Methods included from DefinitionHelpers::NonNullWithBang

#!

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



11
12
13
# File 'lib/graphql/input_object_type.rb', line 11

def description
  @description
end

#input_fieldsObject

Returns the value of attribute input_fields.



11
12
13
# File 'lib/graphql/input_object_type.rb', line 11

def input_fields
  @input_fields
end

#nameObject

Returns the value of attribute name.



11
12
13
# File 'lib/graphql/input_object_type.rb', line 11

def name
  @name
end

Instance Method Details

#kindObject



18
19
20
# File 'lib/graphql/input_object_type.rb', line 18

def kind
  GraphQL::TypeKinds::INPUT_OBJECT
end