Exception: GraphQL::Schema::Timeout::TimeoutError
- Inherits:
-
ExecutionError
- Object
- StandardError
- Error
- ExecutionError
- GraphQL::Schema::Timeout::TimeoutError
- Defined in:
- lib/graphql/schema/timeout.rb
Overview
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) ⇒ TimeoutError
constructor
A new instance of TimeoutError.
Methods inherited from ExecutionError
Constructor Details
#initialize(parent_type, field) ⇒ TimeoutError
Returns a new instance of TimeoutError.
103 104 105 |
# File 'lib/graphql/schema/timeout.rb', line 103 def initialize(parent_type, field) super("Timeout on #{parent_type.graphql_name}.#{field.graphql_name}") end |