Class: GraphQL::NonNullType
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from ObjectType
#fields, #fields=, #inspect, #interfaces
Methods included from Definable
#attr_definable
#!
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_type ⇒ Object
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
|
#kind ⇒ Object
15
16
17
|
# File 'lib/graph_ql/types/non_null_type.rb', line 15
def kind
GraphQL::TypeKinds::NON_NULL
end
|
#name ⇒ Object
7
8
9
|
# File 'lib/graph_ql/types/non_null_type.rb', line 7
def name
"Non-Null"
end
|
#to_s ⇒ Object
19
20
21
|
# File 'lib/graph_ql/types/non_null_type.rb', line 19
def to_s
"<GraphQL::NonNullType(#{of_type.name})>"
end
|