Class: GraphQL::ListType

Inherits:
ObjectType show all
Defined in:
lib/graph_ql/types/list_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ObjectType

#fields, #fields=, #inspect, #interfaces

Methods included from Definable

#attr_definable

Methods included from NonNullWithBang

#!

Constructor Details

#initialize(of_type:) ⇒ ListType

Returns a new instance of ListType.



3
4
5
6
# File 'lib/graph_ql/types/list_type.rb', line 3

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

Instance Attribute Details

#of_typeObject (readonly)

Returns the value of attribute of_type.



2
3
4
# File 'lib/graph_ql/types/list_type.rb', line 2

def of_type
  @of_type
end

Instance Method Details

#kindObject



7
8
9
# File 'lib/graph_ql/types/list_type.rb', line 7

def kind
  GraphQL::TypeKinds::LIST
end

#to_sObject



11
12
13
# File 'lib/graph_ql/types/list_type.rb', line 11

def to_s
  "<GraphQL::ListType(#{of_type.name})>"
end