-
Notifications
You must be signed in to change notification settings - Fork 11
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
Handle loading states for queries that were fired before the subscription is set up #19
Comments
Hi @qwertvasilii, thanks for bringing this up. I'm aware of this, but I didn't work on the fix yet. I'll see if I can provide a fix after the 3.0 PR is merged. |
Any progress on that? |
Not yet, I'm not sure yet what the best solution for this is. The issue is basically this: For a given component tree we append a link that receives all Apollo requests. All operations are passed to the The queries that are immediately called during the first render are available to the dispatcher, but will be missed in the hook subscription since it is set up too late. I can think of two potential solutions based on this:
The first solution would help with the initial render use case but if you purposefully mount a subscription at a later point, you'd still have missed events. The second solution works for lazily mounted components but can still not ensure that every single operation is processed due to the capping of the queue. Current options to avoid this issue with the latest version of
@qwertvasilii Can you elaborate a bit on the circumstances where you're seeing the issue? What does the component tree look like with the Apollo hooks and the subscription hook from |
There's a reproduction for this issue in #36. Thanks to @github0013! |
I wouldn't keep a queue of all requests in the dispatcher, but only the |
Im facing not handled query when application starts up, logging in reducer spit out only successful ended query, but didnt catch start of this query
any solution on this?
The text was updated successfully, but these errors were encountered: