class GraphQL::Schema::NonNull

Wraps a {Schema::Member} when it is required. @see {Schema::Member::TypeSystemHelpers#to_non_null_type}

Attributes

of_type[R]

Public Class Methods

new(of_type) click to toggle source
# File lib/graphql/schema/non_null.rb, line 10
def initialize(of_type)
  @of_type = of_type
end

Public Instance Methods

kind() click to toggle source
# File lib/graphql/schema/non_null.rb, line 28
def kind
  GraphQL::TypeKinds::NON_NULL
end
list?() click to toggle source

@return [Boolean] True if this type wraps a list type

# File lib/graphql/schema/non_null.rb, line 24
def list?
  @of_type.list?
end
non_null?() click to toggle source

@return [true]

# File lib/graphql/schema/non_null.rb, line 19
def non_null?
  true
end
to_graphql() click to toggle source
# File lib/graphql/schema/non_null.rb, line 14
def to_graphql
  @of_type.graphql_definition.to_non_null_type
end
to_type_signature() click to toggle source
# File lib/graphql/schema/non_null.rb, line 36
def to_type_signature
  "#{@of_type.to_type_signature}!"
end
unwrap() click to toggle source
# File lib/graphql/schema/non_null.rb, line 32
def unwrap
  @of_type.unwrap
end