class GraphQL::InvalidNullError
for a non-null field.
Raised automatically when a field’s resolve function returns ‘nil`
def initialize(parent_type, field, value)
def initialize(parent_type, field, value) @parent_type = parent_type @field = field @value = value super("Cannot return null for non-nullable field #{@parent_type.name}.#{@field.name}") end
def parent_error?
- always false
def parent_error? false end
def to_h
-
(Hash)
- An entry for the response's "errors" key
def to_h { "message" => message } end