Skip to content
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

Documentation about using AbortController and GraphQL request cancellation in SSR #10312

Open
LevanArabuli opened this issue Nov 23, 2022 · 1 comment

Comments

@LevanArabuli
Copy link

Hey team,

Can you please add a documentation on using AbortController on SSR (Server side rendering)?
We came across a problem recently where a lot of requests that our React SSR Apollo client(hosted in Node) is sending to Apollo server(hosted in Node) are not timing out for very long time.
We have native timeouts on both SSR and Apollo server node processes ex. https://nodejs.org/api/http.html#serversettimeoutmsecs-callback.
However, even with Apollo server timing out client request(client is SSR in this case), a lot of GraphQL queries are still left as "orphaned" and are stuck for 200-300 seconds 😏

We are implementing a cancellation mechanism using AbortController, but didn't find any proper documentation around using it. Of course we went through the issue history, checking out source code, as well as other implementations:

It will be helpful if there's an official guide on using AbortController in SSR (or just client side).

Kudos!

@LevanArabuli
Copy link
Author

Hi team, any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants