Class: GraphQL::ListType

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

Overview

A list type wraps another type.

See TypeKind#unwrap for accessing the modified type

Instance Attribute Summary collapse

Attributes inherited from ObjectType

#description, #fields, #interfaces, #name

Instance Method Summary collapse

Methods inherited from ObjectType

#==, #to_s

Methods included from DefinitionHelpers::DefinedByConfig

included

Methods included from DefinitionHelpers::NonNullWithBang

#!

Constructor Details

#initialize(of_type:) ⇒ ListType

Returns a new instance of ListType.


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

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

Instance Attribute Details

#of_typeObject (readonly)

Returns the value of attribute of_type


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

def of_type
  @of_type
end

Instance Method Details

#kindObject


10
11
12
# File 'lib/graphql/list_type.rb', line 10

def kind
  GraphQL::TypeKinds::LIST
end