-
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
TypePolicy merge function called before cache deep merge #9503
base: main
Are you sure you want to change the base?
TypePolicy merge function called before cache deep merge #9503
Conversation
9946233
to
6644576
Compare
adds test fix formatting
6644576
to
045a9d5
Compare
const merge = typePolicy.merge; | ||
if (merge) { | ||
mergeTree.info = { | ||
field: undefined as any, |
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.
Not sure what field should be set here, I don't think we need a field in this case.
@@ -660,6 +675,9 @@ export class StoreWriter { | |||
} | |||
|
|||
if (mergeTree.info) { | |||
if(isReference(existing) && isReference(incoming)){ |
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.
may be we should check if they are the same ref too?
@gastonmorixe Thanks for diving into this thorny area of the code, and for all the time you must have spent debugging. I owe you a more thorough review, but I appreciate the clarity of your proposed solution. We will get this sorted out before v3.6 is released (in mid-March). |
Thank you @benjamn |
@benjamn @gastonmorixe Has this issue been solved in 3.6.0? |
Or is there maybe a workaround that we can use until then? 😀 |
@benjamn update on this? It's working for us quite well in production |
@benjamn @gastonmorixe is this going anywhere? merge isn't useable for quite a few cases until this is resolved... |
Well, in the meantime you can use my PR/branch. Google how to use patch-package or check the releases in our fork. We update them every few months to keep in sync. Yes, I agree without this fixed Apollo Client would be useless for us. That's why we took like a week to find a fix, we couldn't afford not having this solved after all our app is based on this framework. Which mostly we love. @benjamn updates? Thank you! |
Issue #9502 based on v3.5.10