Class: GraphQL::NonNullType
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
#unwrap
Methods inherited from BaseType
#==, #resolve_type, #to_list_type, #to_non_null_type, #unwrap
included
#!
Constructor Details
#initialize(of_type:) ⇒ NonNullType
Returns a new instance of NonNullType.
8
9
10
|
# File 'lib/graphql/non_null_type.rb', line 8
def initialize(of_type:)
@of_type = of_type
end
|
Instance Attribute Details
#of_type ⇒ Object
Returns the value of attribute of_type.
7
8
9
|
# File 'lib/graphql/non_null_type.rb', line 7
def of_type
@of_type
end
|
Instance Method Details
20
21
22
|
# File 'lib/graphql/non_null_type.rb', line 20
def coerce_input(value)
of_type.coerce_input(value)
end
|
#coerce_result(value) ⇒ Object
24
25
26
|
# File 'lib/graphql/non_null_type.rb', line 24
def coerce_result(value)
of_type.coerce_result(value)
end
|
#kind ⇒ Object
28
29
30
|
# File 'lib/graphql/non_null_type.rb', line 28
def kind
GraphQL::TypeKinds::NON_NULL
end
|
#name ⇒ Object
12
13
14
|
# File 'lib/graphql/non_null_type.rb', line 12
def name
"Non-Null"
end
|
#to_s ⇒ Object
32
33
34
|
# File 'lib/graphql/non_null_type.rb', line 32
def to_s
"#{of_type.to_s}!"
end
|
16
17
18
|
# File 'lib/graphql/non_null_type.rb', line 16
def valid_input?(value)
!value.nil? && of_type.valid_input?(value)
end
|