-
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
Fix cache normalization for mixed fields #3422
Fix cache normalization for mixed fields #3422
Conversation
🤕 This bug is still relevant and causing us issues in production It would be helpful to get a rough idea on when somebody will get to review this, so that we can figure out whether it's worth to create a workaround in the meantime. Thanks! |
It has been two weeks :( Anyone? |
This is now affecting us too. |
At a first quick glance this looks awesome @dferber90 - thanks very much for working on this! I've slotted this in for a more thorough review, and will have updates to you shortly. 🤞 this should be merged in sometime tomorrow (and will be included in next Tuesday's release). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks great @dferber90 - thanks very much for your work on this. LGTM!
🎈Excellent, thanks for taking the time! I'm looking forward to the release |
Summary
Given a query
which gets executed twice where
species
could either be of GQL typeDog
orCat
, and where the responses have the species types inlined with nodataId
and occur sequentially, in this order:the store should finally contain
However, without this PR it would wrongly contain
'$ROOT_QUERY.animals.0.species': undefined
(and some other stuff).Description
It seems that the cache attempted to do cleanup of a generated object in case the reference to it gets replaced with one where we're actually provided a non-generated id. However, this also ran when a generated object's type changed, thus accidentally removing the newly generated object.
Details are in #3419
closes #3419