Exception: GraphQL::Schema::TimeoutMiddleware::TimeoutError

Inherits:
ExecutionError show all
Defined in:
lib/graphql/schema/timeout_middleware.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

Methods inherited from ExecutionError

#to_h

Constructor Details

#initialize(parent_type, field_defn) ⇒ TimeoutError

Returns a new instance of TimeoutError.



82
83
84
# File 'lib/graphql/schema/timeout_middleware.rb', line 82

def initialize(parent_type, field_defn)
  super("Timeout on #{parent_type.name}.#{field_defn.name}")
end