Class: GraphQL::Schema::List
- Inherits:
-
Object
- Object
- GraphQL::Schema::List
- Defined in:
- lib/graphql/schema/list.rb
Overview
Represents a list type in the schema. Wraps a Member as a list type.
Instance Attribute Summary collapse
-
#of_type ⇒ Class, Module
readonly
The inner type of this list, the type of which one or more objects may be present.
Instance Method Summary collapse
-
#initialize(of_type) ⇒ List
constructor
A new instance of List.
-
#kind ⇒ Object
-
#to_graphql ⇒ Object
-
#unwrap ⇒ Object
Methods included from Member::TypeSystemHelpers
#list?, #non_null?, #to_list_type, #to_non_null_type
Methods included from Member::CachedGraphQLDefinition
#graphql_definition, #initialize_copy
Constructor Details
#initialize(of_type) ⇒ List
Returns a new instance of List
15 16 17 |
# File 'lib/graphql/schema/list.rb', line 15 def initialize(of_type) @of_type = of_type end |
Instance Attribute Details
#of_type ⇒ Class, Module (readonly)
Returns The inner type of this list, the type of which one or more objects may be present.
13 14 15 |
# File 'lib/graphql/schema/list.rb', line 13 def of_type @of_type end |
Instance Method Details
#kind ⇒ Object
23 24 25 |
# File 'lib/graphql/schema/list.rb', line 23 def kind GraphQL::TypeKinds::LIST end |
#to_graphql ⇒ Object
19 20 21 |
# File 'lib/graphql/schema/list.rb', line 19 def to_graphql @of_type.graphql_definition.to_list_type end |
#unwrap ⇒ Object
27 28 29 |
# File 'lib/graphql/schema/list.rb', line 27 def unwrap @of_type.unwrap end |