Class: GraphQL::NonNullType

Inherits:
ObjectType show all
Defined in:
lib/graph_ql/types/non_null_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ObjectType

#arg, #field, #fields, #fields=, #interfaces, #to_s, #type

Methods included from Definable

#attr_definable

Methods included from NonNullWithBang

#!

Constructor Details

#initialize(of_type:) ⇒ NonNullType

Returns a new instance of NonNullType.



3
4
5
# File 'lib/graph_ql/types/non_null_type.rb', line 3

def initialize(of_type:)
  @of_type = of_type
end

Instance Attribute Details

#of_typeObject (readonly)

Returns the value of attribute of_type.



2
3
4
# File 'lib/graph_ql/types/non_null_type.rb', line 2

def of_type
  @of_type
end

Instance Method Details

#coerce(value) ⇒ Object



11
12
13
# File 'lib/graph_ql/types/non_null_type.rb', line 11

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

#kindObject



15
16
17
# File 'lib/graph_ql/types/non_null_type.rb', line 15

def kind
  GraphQL::TypeKinds::NON_NULL
end

#nameObject



7
8
9
# File 'lib/graph_ql/types/non_null_type.rb', line 7

def name
  "Non-Null"
end