Sha256: b321e865f7d647f2d8b93a653237eced15ba0fb30a808be408af3b33e450a552
Contents?: true
Size: 605 Bytes
Versions: 13
Compression:
Stored size: 605 Bytes
Contents
module GraphQL # Raised automatically when a field's resolve function returns `nil` # for a non-null field. class InvalidNullError < GraphQL::Error def initialize(field_name, value) @field_name = field_name @value = value super("Cannot return null for non-nullable field #{@field_name}") end # @return [Hash] An entry for the response's "errors" key def to_h { "message" => message } end # @return [Boolean] Whether the null in question was caused by another error def parent_error? @value.is_a?(GraphQL::ExecutionError) end end end
Version data entries
13 entries across 13 versions & 1 rubygems