Skip to content

Support disabling timeout mid-way through #5361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2025
Merged

Support disabling timeout mid-way through #5361

merged 1 commit into from
May 27, 2025

Conversation

rmosolgo
Copy link
Owner

@rmosolgo rmosolgo commented May 22, 2025

Now, inside handle_timeout, you can disable the timeout for the rest of the query like this:

class MyCustomTimeout < GraphQL::Schema::Timeout 
  def handle_timeout(error, query)
    if some_condition?
      disable_timeout(query) 
    else 
      # raise error, or log it, etc 
    end 
  end 
end 

@rmosolgo rmosolgo added this to the 2.5.8 milestone May 22, 2025
@rmosolgo rmosolgo merged commit fb9d48c into master May 27, 2025
15 checks passed
@rmosolgo rmosolgo deleted the disable-timeout branch May 27, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant