Exception: GraphQL::Schema::TimeoutMiddleware::TimeoutError Private
- Inherits:
-
ExecutionError
- Object
- StandardError
- Error
- ExecutionError
- GraphQL::Schema::TimeoutMiddleware::TimeoutError
- Defined in:
- lib/graphql/schema/timeout_middleware.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This error is raised when a query exceeds max_seconds
.
Since it’s a child of ExecutionError,
its message will be added to the response’s errors
key.
To raise an error that will stop query resolution, use a custom block
to take this error and raise a new one which doesn’t descend from ExecutionError,
such as RuntimeError
.
Instance Attribute Summary
Attributes inherited from ExecutionError
#ast_node, #extensions, #options, #path
Instance Method Summary collapse
-
#initialize(parent_type, field_defn) ⇒ TimeoutError
constructor
private
A new instance of TimeoutError.
Methods inherited from ExecutionError
Constructor Details
#initialize(parent_type, field_defn) ⇒ TimeoutError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TimeoutError
79 80 81 |
# File 'lib/graphql/schema/timeout_middleware.rb', line 79 def initialize(parent_type, field_defn) super("Timeout on #{parent_type.name}.#{field_defn.name}") end |