Sha256: 1416987f499daf04376292f8bb7857ddce8cc4f2d55be978aab3b1dd90381c5e

Contents?: true

Size: 1002 Bytes

Versions: 65

Compression:

Stored size: 1002 Bytes

Contents

# frozen_string_literal: true

module GraphQL
  # Raised when a argument is configured with `loads:` and the client provides an `ID`,
  # but no object is loaded for that ID.
  #
  # @see GraphQL::Schema::Member::HasArguments::ArgumentObjectLoader#load_application_object_failed, A hook which you can override in resolvers, mutations and input objects.
  class LoadApplicationObjectFailedError < GraphQL::ExecutionError
    # @return [GraphQL::Schema::Argument] the argument definition for the argument that was looked up
    attr_reader :argument
    # @return [String] The ID provided by the client
    attr_reader :id
    # @return [Object] The value found with this ID
    attr_reader :object
    # @return [GraphQL::Query::Context]
    attr_reader :context

    def initialize(argument:, id:, object:, context:)
      @id = id
      @argument = argument
      @object = object
      @context = context
      super("No object found for `#{argument.graphql_name}: #{id.inspect}`")
    end
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
graphql-2.4.14 lib/graphql/load_application_object_failed_error.rb
graphql-2.3.22 lib/graphql/load_application_object_failed_error.rb
graphql-2.1.15 lib/graphql/load_application_object_failed_error.rb
graphql-2.1.14 lib/graphql/load_application_object_failed_error.rb
graphql-2.2.17 lib/graphql/load_application_object_failed_error.rb
graphql-2.3.21 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.13 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.12 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.11 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.10 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.9 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.8 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.7 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.6 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.5 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.4 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.3 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.2 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.1 lib/graphql/load_application_object_failed_error.rb
graphql-2.4.0 lib/graphql/load_application_object_failed_error.rb