Class: GraphQL::ListType

Inherits:
BaseType show all
Includes:
BaseType::ModifiesAnotherType
Defined in:
lib/graphql/list_type.rb

Overview

A list type wraps another type.

Get the underlying type with BaseType::ModifiesAnotherType#unwrap

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from BaseType::ModifiesAnotherType

#unwrap

Methods inherited from BaseType

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

Methods included from DefinitionHelpers::DefinedByConfig

included

Methods included from DefinitionHelpers::NonNullWithBang

#!

Constructor Details

#initialize(of_type:) ⇒ ListType

Returns a new instance of ListType.



7
8
9
10
# File 'lib/graphql/list_type.rb', line 7

def initialize(of_type:)
  @name = "List"
  @of_type = of_type
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/graphql/list_type.rb', line 6

def name
  @name
end

#of_typeObject (readonly)

Returns the value of attribute of_type.



6
7
8
# File 'lib/graphql/list_type.rb', line 6

def of_type
  @of_type
end

Instance Method Details

#kindObject



12
13
14
# File 'lib/graphql/list_type.rb', line 12

def kind
  GraphQL::TypeKinds::LIST
end