Sha256: c181e4e16ccdb135146f4e6a810b3af06d5850a2d3712c4b1d91d7da583835ce
Contents?: true
Size: 598 Bytes
Versions: 19
Compression:
Stored size: 598 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 end # @return [Hash] An entry for the response's "errors" key def to_h { "message" => "Cannot return null for non-nullable field #{@field_name}" } 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
19 entries across 19 versions & 1 rubygems