cache data may be lost when replacing the albums field of a Product object. To address this problem (which is not a bug in Apollo Client), define a custom merge function for the Product.albums field, so InMemoryCache can safely merge these objects
I’ve encounter this warning while working on a mutation that gets an array back.
my situation is, sending mutation to add/remove active item to/from a list.
For response will get the effective list of active items.
I have searched for this warning, and i saw that it may be something about not querying the id field, which is not my case.
So I have been wondering why this warning is showed.
Because it does not affect anything, the warning shows up once, and no more.
I’ve read that, by default, the cache field’s existing array is completely replaced by the incoming array,
and this is exactly the behavior i want.
I know I can write a typePolicies to solve this problem, but I wonder if it’s necessary? for it’s default already being what i want.
is this warning just a friendly note? or do this affect some part i’ve failed to notice?
It seemed strange for apollo server to simply give out friendly note, but I just couldn’t find out the reason.