Class: GraphQL::Schema::NonNull Private
- Inherits:
-
Object
- Object
- GraphQL::Schema::NonNull
- Defined in:
- lib/graphql/schema/non_null.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Wraps a Member when it is required.
Instance Attribute Summary collapse
-
#of_type ⇒ Object
readonly
private
Instance Method Summary collapse
-
#initialize(of_type) ⇒ NonNull
constructor
private
A new instance of NonNull.
-
#kind ⇒ Object
private
-
#list? ⇒ Boolean
private
True if this type wraps a list type.
-
#non_null? ⇒ true
private
-
#to_graphql ⇒ Object
private
-
#unwrap ⇒ Object
private
Methods included from Member::TypeSystemHelpers
#to_list_type, #to_non_null_type
Methods included from Member::CachedGraphQLDefinition
#graphql_definition, #initialize_copy
Constructor Details
#initialize(of_type) ⇒ NonNull
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of NonNull
11 12 13 |
# File 'lib/graphql/schema/non_null.rb', line 11 def initialize(of_type) @of_type = of_type end |
Instance Attribute Details
#of_type ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 |
# File 'lib/graphql/schema/non_null.rb', line 10 def of_type @of_type end |
Instance Method Details
#kind ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 30 31 |
# File 'lib/graphql/schema/non_null.rb', line 29 def kind GraphQL::TypeKinds::NON_NULL end |
#list? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns True if this type wraps a list type
25 26 27 |
# File 'lib/graphql/schema/non_null.rb', line 25 def list? @of_type.list? end |
#non_null? ⇒ true
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/graphql/schema/non_null.rb', line 20 def non_null? true end |
#to_graphql ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 |
# File 'lib/graphql/schema/non_null.rb', line 15 def to_graphql @of_type.graphql_definition.to_non_null_type end |
#unwrap ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 |
# File 'lib/graphql/schema/non_null.rb', line 33 def unwrap @of_type.unwrap end |