Method: GraphQL::Types::Relay::EdgeBehaviors::ClassMethods#node_nullable

Defined in:
lib/graphql/types/relay/edge_behaviors.rb

#node_nullable(new_value = nil) ⇒ Object

Set the default node_nullable for this class and its child classes. (Defaults to true.) Use node_nullable(false) in your base class to make non-null node field.



77
78
79
80
81
82
83
# File 'lib/graphql/types/relay/edge_behaviors.rb', line 77

def node_nullable(new_value = nil)
  if new_value.nil?
    @node_nullable != nil ? @node_nullable : superclass.node_nullable
  else
    @node_nullable = new_value
  end
end