Class: GraphQL::Schema::List

Inherits:
Wrapper
  • Object
show all
Defined in:
lib/graphql/schema/list.rb

Overview

Represents a list type in the schema. Wraps a Member as a list type.

See Also:

  • {Schema{Schema::Member{Schema::Member::TypeSystemHelpers{Schema::Member::TypeSystemHelpers#to_list_type}

Instance Attribute Summary

Attributes inherited from Wrapper

#of_type

Instance Method Summary collapse

Methods inherited from Wrapper

#==, #initialize, #unwrap

Methods included from Member::TypeSystemHelpers

#non_null?, #to_list_type, #to_non_null_type

Methods included from Member::CachedGraphQLDefinition

#graphql_definition, #initialize_copy

Constructor Details

This class inherits a constructor from GraphQL::Schema::Wrapper

Instance Method Details

#kindGraphQL::TypeKinds::LIST

Returns:

  • (GraphQL::TypeKinds::LIST)


14
15
16
# File 'lib/graphql/schema/list.rb', line 14

def kind
  GraphQL::TypeKinds::LIST
end

#list?true

Returns:

  • (true)


19
20
21
# File 'lib/graphql/schema/list.rb', line 19

def list?
  true
end

#to_graphqlObject



9
10
11
# File 'lib/graphql/schema/list.rb', line 9

def to_graphql
  @of_type.graphql_definition.to_list_type
end

#to_type_signatureObject



23
24
25
# File 'lib/graphql/schema/list.rb', line 23

def to_type_signature
  "[#{@of_type.to_type_signature}]"
end