-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Potential issue when this.store[fetchMoreForQueryId]
is undefined
#3345
Comments
I noticed this as well. Does your app use SSR? The way I can reproduce it 100%:
I am unable to reproduce this without that initial SSR. So if I load a page on the client that fires a In my mind, a dismount should not cause any queries in flight to fail, but it looks to be related to SSR. |
No, this is a React native app. So doesn’t seem to be the case for us |
same |
👋 Surfing in here from Google. To add more background to this for anyone else, we encountered this error as well, but only on some of our FlatLists. Then I figured out they differed in how we were working around this bug in FlatList which fired our So while I don't know exactly what's going on in Apollo when a component is unmounted when multiple queries are in flight, I believe this is |
Why is this closed? I'm still encountering the issue and submitted a PR #3914 |
I'm seeing this error logged in a production app every so often:
I believe I've traced it to here:
apollo-client/packages/apollo-client/src/data/queries.ts
Lines 128 to 130 in 6abcd72
I see above this function checks for the existence of
this.store[queryId]
, would it make sense to do a similar check forthis.store[fetchMoreForQueryId]
inside of this conditional? Happy to open a PR, if so.Trying to think through what could be happening....a
fetchMore
is triggered, and then resolves after the component is unmounted perhaps? Not sure of how the lifecycle on thegraphql
HOC plays here.The text was updated successfully, but these errors were encountered: