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

Defined in:
lib/graphql/types/relay/connection_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 and nodes fields.



129
130
131
132
133
134
135
# File 'lib/graphql/types/relay/connection_behaviors.rb', line 129

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