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

Batching boundaries (feature idea) #1477

Closed
langpavel opened this issue Mar 23, 2017 · 2 comments
Closed

Batching boundaries (feature idea) #1477

langpavel opened this issue Mar 23, 2017 · 2 comments

Comments

@langpavel
Copy link

Hi

There is batching client for Apollo. But Is there a manual callback which can be used instead of waiting for timeout?

You should be able to tell batching interface to not wait anymore because you know that all code paths which can trigger new requests are finished.. This is typically happens after you get callback from your top level router, ReactDOM.render or own logic..

This is especially useful on client. But it can be very useful when you SSR too!
You can reevaluate component tree again because there are some deeply nested component scenarios which you can interrupt at right time.
You should also know if there are new requests, say after 200ms after first SSR iteration (or more after when you detect search bot).

I know, there is server side helper, I'm using it, you can look at code. I'm coauthor of kriasoft/react-starter-kit and author of feature/apollo and other branches which teach people how to opt-in all these great features (not all are perfect I know, but hey, nobody is 😈)

@helfer
Copy link
Contributor

helfer commented Apr 4, 2017

Hi @langpavel! I think it's a pretty good idea, and I'd be open to a PR! 🙂

@helfer
Copy link
Contributor

helfer commented May 3, 2017

Closing this since it's been a while, but still interested in an eventual PR, if someone wants to give it a try.

@helfer helfer closed this as completed May 3, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants