Class: GraphWeaver::Codegen::NonNull

Inherits:
Node
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/graph_weaver/codegen/nodes.rb

Overview

NonNull is its inner node with the nilability stripped — everything else passes through.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#bare_type, #coerce?, #hash_coerce_identity?, #identity?, #nested, #serialize_identity?

Constructor Details

#initialize(of) ⇒ NonNull

Returns a new instance of NonNull.



85
86
87
# File 'lib/graph_weaver/codegen/nodes.rb', line 85

def initialize(of)
  @of = of
end

Instance Attribute Details

#ofObject (readonly)

Returns the value of attribute of.



80
81
82
# File 'lib/graph_weaver/codegen/nodes.rb', line 80

def of
  @of
end

Instance Method Details

#non_null?Boolean

Returns:

  • (Boolean)


90
# File 'lib/graph_weaver/codegen/nodes.rb', line 90

def non_null? = true

#prop_typeObject



89
# File 'lib/graph_weaver/codegen/nodes.rb', line 89

def prop_type = bare_type