Class: GraphQL::Schema::NonNull
- Defined in:
- lib/graphql/schema/non_null.rb
Overview
Represents a non null type in the schema. Wraps a Member when it is required.
Instance Attribute Summary
Attributes inherited from Wrapper
Instance Method Summary collapse
- #kind ⇒ GraphQL::TypeKinds::NON_NULL
-
#list? ⇒ Boolean
True if this type wraps a list type.
- #non_null? ⇒ true
- #to_graphql ⇒ Object
- #to_type_signature ⇒ Object
Methods inherited from Wrapper
Methods included from Member::TypeSystemHelpers
#to_list_type, #to_non_null_type
Methods included from Member::CachedGraphQLDefinition
#graphql_definition, #initialize_copy
Constructor Details
This class inherits a constructor from GraphQL::Schema::Wrapper
Instance Method Details
#kind ⇒ GraphQL::TypeKinds::NON_NULL
14 15 16 |
# File 'lib/graphql/schema/non_null.rb', line 14 def kind GraphQL::TypeKinds::NON_NULL end |
#list? ⇒ Boolean
Returns True if this type wraps a list type.
24 25 26 |
# File 'lib/graphql/schema/non_null.rb', line 24 def list? @of_type.list? end |
#non_null? ⇒ true
19 20 21 |
# File 'lib/graphql/schema/non_null.rb', line 19 def non_null? true end |
#to_graphql ⇒ Object
9 10 11 |
# File 'lib/graphql/schema/non_null.rb', line 9 def to_graphql @of_type.graphql_definition.to_non_null_type end |
#to_type_signature ⇒ Object
28 29 30 |
# File 'lib/graphql/schema/non_null.rb', line 28 def to_type_signature "#{@of_type.to_type_signature}!" end |