Sha256: 719c2efa8aee5493740f7bb264235e45bfdb84a52923af3db2205edcfef19ed3
Contents?: true
Size: 900 Bytes
Versions: 75
Compression:
Stored size: 900 Bytes
Contents
# frozen_string_literal: true module GraphQL # Raised automatically when a field's resolve function returns `nil` # for a non-null field. class InvalidNullError < GraphQL::RuntimeTypeError # @return [GraphQL::BaseType] The owner of {#field} attr_reader :parent_type # @return [GraphQL::Field] The field which failed to return a value attr_reader :field # @return [nil, GraphQL::ExecutionError] The invalid value for this field attr_reader :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 # @return [Hash] An entry for the response's "errors" key def to_h { "message" => message } end # @deprecated always false def parent_error? false end end end
Version data entries
75 entries across 75 versions & 1 rubygems