class GraphQL::Schema::Timeout::TimeoutError

This error is raised when a query exceeds ‘max_seconds`. Since it’s a child of {GraphQL::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 {GraphQL::ExecutionError}, such as ‘RuntimeError`.

Public Class Methods

new(parent_type, field) click to toggle source
Calls superclass method GraphQL::ExecutionError::new
# File lib/graphql/schema/timeout.rb, line 117
def initialize(parent_type, field)
  super("Timeout on #{parent_type.graphql_name}.#{field.graphql_name}")
end