Sha256: adcec6882019cf66ac392ece081f60b4217cff0205021c53a4dedb4badc04a99

Contents?: true

Size: 365 Bytes

Versions: 7

Compression:

Stored size: 365 Bytes

Contents

# A non-null type wraps another type.
#
# See {TypeKind#unwrap} for accessing the modified type
class GraphQL::NonNullType < GraphQL::ObjectType
  attr_reader :of_type
  def initialize(of_type:)
    @of_type = of_type
  end

  def name
    "Non-Null"
  end

  def coerce(value)
    of_type.coerce(value)
  end

  def kind
    GraphQL::TypeKinds::NON_NULL
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
graphql-0.7.1 lib/graphql/non_null_type.rb
graphql-0.7.0 lib/graphql/non_null_type.rb
graphql-0.6.2 lib/graphql/non_null_type.rb
graphql-0.6.1 lib/graphql/non_null_type.rb
graphql-0.6.0 lib/graphql/non_null_type.rb
graphql-0.5.0 lib/graph_ql/non_null_type.rb
graphql-0.4.0 lib/graph_ql/non_null_type.rb