Skip to content

Support a configurable GraphQL request timeout for both reactive and synchronous controllers #1150

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

Closed
tstocker-black-cape opened this issue Mar 11, 2025 · 2 comments
Labels
status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged

Comments

@tstocker-black-cape
Copy link

Now that reactive request cancellation is supported (#1149), it would be really nice if we could configure a request timeout for a server. An example use case for this is a GraphQL server that lives behind a reverse proxy and the reverse proxy has a configured max timeout. In this scenario, a may request a GraphQL request and proxy returns a 408, but the server is still executing the potentially long running work. If the server sets the request timeout to the same value as the reverse proxy, it can avoid spending resources processing requests that have already been terminated.

For Reactive requests, the timeout value should be set. For synchronous/virtual thread calls, thread interrupts could be leveraged.

I'd like to see some simple configuration like spring.graphql.timeout=10s

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 11, 2025
@bclozel
Copy link
Member

bclozel commented Mar 11, 2025

Isn't that what #450 is all about?

@bclozel bclozel added the status: waiting-for-feedback We need additional information before we can continue label Mar 11, 2025
@tstocker-black-cape
Copy link
Author

Ah! Yes it is. For some reason I recall that one being closed, so I was just attempting to re-raise the issue. Sorry for the duplicate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants