module GraphQL::Schema::Member::TypeSystemHelpers
Public Class Methods
Source
# File lib/graphql/schema/member/type_system_helpers.rb, line 10 def initialize(...) super @to_non_null_type ||= nil @to_list_type ||= nil end
Calls superclass method
Public Instance Methods
# File lib/graphql/schema/member/type_system_helpers.rb, line 82 def kind raise GraphQL::RequiredImplementationMissingError, "No `.kind` defined for #{self}" end
Returns
Source
# File lib/graphql/schema/member/type_system_helpers.rb, line 66 def list? false end
Returns
-
Boolean— true if this is a list type. A non-nullable list is considered a list.
Source
# File lib/graphql/schema/member/type_system_helpers.rb, line 56 def non_null? false end
Returns
-
Boolean— true if this is a non-nullable type. A nullable list of non-nullables is considered nullable.
# File lib/graphql/schema/member/type_system_helpers.rb, line 39 def to_list_type @to_list_type || begin t = GraphQL::Schema::List.new(self) if frozen? t else @to_list_type = t end end end
Returns
-
Schema::List— Make a list-type representation of this type
# File lib/graphql/schema/member/type_system_helpers.rb, line 22 def to_non_null_type @to_non_null_type || begin t = GraphQL::Schema::NonNull.new(self) if frozen? t else @to_non_null_type = t end end end
Returns
-
Schema::NonNull— Make a non-null-type representation of this type
Source
# File lib/graphql/schema/member/type_system_helpers.rb, line 70 def to_type_signature # Each host provides `graphql_name`, but they have no common ancestor member = self #: untyped member.graphql_name end