Sha256: 4df9b3dfb03be88112ed39cbc2b2b80d7a04aa90d7c8b90042ac7b6d05f1db64

Contents?: true

Size: 901 Bytes

Versions: 134

Compression:

Stored size: 901 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
    def initialize(argument:, id:, object:)
      @id = id
      @argument = argument
      @object = object
      super("No object found for `#{argument.graphql_name}: #{id.inspect}`")
    end
  end
end

Version data entries

134 entries across 134 versions & 2 rubygems

Version Path
graphql-2.0.31 lib/graphql/load_application_object_failed_error.rb
graphql-1.13.23 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.29 lib/graphql/load_application_object_failed_error.rb
graphql-1.13.22 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.28 lib/graphql/load_application_object_failed_error.rb
graphql-1.13.21 lib/graphql/load_application_object_failed_error.rb
graphql-1.13.20 lib/graphql/load_application_object_failed_error.rb
graphql-2.1.3 lib/graphql/load_application_object_failed_error.rb
graphql-2.1.2 lib/graphql/load_application_object_failed_error.rb
graphql-2.1.1 lib/graphql/load_application_object_failed_error.rb
graphql-2.1.0 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.27 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.26 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.25 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.24 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.23 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.22 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.21 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.20 lib/graphql/load_application_object_failed_error.rb
graphql-2.0.17.2 lib/graphql/load_application_object_failed_error.rb