Exception: GraphQL::LoadApplicationObjectFailedError
- Inherits:
-
ExecutionError
- Object
- StandardError
- Error
- ExecutionError
- GraphQL::LoadApplicationObjectFailedError
- Defined in:
- lib/graphql/load_application_object_failed_error.rb
Overview
Raised when a argument is configured with loads:
and the client provides an ID
,
but no object is loaded for that ID.
Instance Attribute Summary collapse
-
#argument ⇒ GraphQL::Schema::Argument
readonly
The argument definition for the argument that was looked up.
-
#id ⇒ String
readonly
The ID provided by the client.
-
#object ⇒ Object
readonly
The value found with this ID.
Attributes inherited from ExecutionError
#ast_node, #extensions, #options, #path
Instance Method Summary collapse
-
#initialize(argument:, id:, object:) ⇒ LoadApplicationObjectFailedError
constructor
A new instance of LoadApplicationObjectFailedError.
Methods inherited from ExecutionError
Constructor Details
#initialize(argument:, id:, object:) ⇒ LoadApplicationObjectFailedError
Returns a new instance of LoadApplicationObjectFailedError
15 16 17 18 19 20 |
# File 'lib/graphql/load_application_object_failed_error.rb', line 15 def initialize(argument:, id:, object:) @id = id @argument = argument @object = object super("No object found for `#{argument.graphql_name}: #{id.inspect}`") end |
Instance Attribute Details
#argument ⇒ GraphQL::Schema::Argument (readonly)
Returns the argument definition for the argument that was looked up
10 11 12 |
# File 'lib/graphql/load_application_object_failed_error.rb', line 10 def argument @argument end |
#id ⇒ String (readonly)
Returns The ID provided by the client
12 13 14 |
# File 'lib/graphql/load_application_object_failed_error.rb', line 12 def id @id end |
#object ⇒ Object (readonly)
Returns The value found with this ID
14 15 16 |
# File 'lib/graphql/load_application_object_failed_error.rb', line 14 def object @object end |