-
Notifications
You must be signed in to change notification settings - Fork 787
Old query data loaded, even though the redux store was cleared #890
Comments
This issue has been automatically labled because it has not had recent activity. If you have not received a response from anyone, please mention the repository maintainer (most likely @jbaxleyiii). It will be closed if no further activity occurs. Thank you for your contributions to React Apollo! |
Related to #807? |
Yes, the "load old data on error" part is related to #807, additional to the issue not being able to clear data properly. |
yes this is a big problem for us. we had to roll back to |
Experiencing the same here also had to roll back to |
This issue has been automatically labled because it has not had recent activity. If you have not received a response from anyone, please mention the repository maintainer (most likely @jbaxleyiii). It will be closed if no further activity occurs. Thank you for your contributions to React Apollo! |
@jbaxleyiii still relevant |
Having this issue as well |
This issue has been automatically labled because it has not had recent activity. If you have not received a response from anyone, please mention the repository maintainer (most likely @jbaxleyiii). It will be closed if no further activity occurs. Thank you for your contributions to React Apollo! |
Is there anyone actively working on a PR for this issue, or at least know what to do to solve it? This is a pretty severe bug for any apps that involve authentication and user data. |
This issue has been automatically labled because it has not had recent activity. If you have not received a response from anyone, please mention the repository maintainer (most likely @jbaxleyiii). It will be closed if no further activity occurs. Thank you for your contributions to React Apollo! |
(this should probably not be closed by staling) |
Maybe the bot should ignore bug-tagged issues and only stale issues untagged or tagged with something like "waiting for response". |
Same here. And it's a big issue for us. |
#1281 At least 4 issues related to this. |
Same here. |
Redux stores are no longer in use - closing - housekeeping. |
Reproduce:
provoking any error- just execute it, no error needed.Expected result:
No data from the query passed through the graphql HOC
Actual result:
Data, which was successfully loaded before store clear..
I'm trying to make a test reproducing it. My current assumption is that the observable is leaking data.
update 1
Checked the code. It looks like the apollo client has state outside the actual redux state, which is not cleared/reset, when you reset the redux state. Its coming from active observables. And using the ApolloClient.resetStore API is, as documented, not really resetting the data, but refetching queries.
So when you have authorized APIs you can not return errors, you have to return blank results to make this work, or else whenever you logout a user and clear using resetStore, you get 100 errors everywhere. Else: when you clear via redux HOR or dispatching APOLLO_STORE_RESET, data is leaked through observables via last result.
This is totally flawed :(
Version
The text was updated successfully, but these errors were encountered: