Merging normalized objects

Hello! As the Apollo Client docs say, since 3.3 we can “define a default merge function for a non-normalized object type”.

I’d like to be able to control which of two versions of an object gets merged into the cache and have those objects be normalized. For example:

If incoming.version > existing.version, cache incoming object
If existing.version >= incoming.version, keep existing object in cache

Would very much appreciate any ideas on how to accomplish this on objects that are normalized.

Hi @jekelly-adobe :wave: welcome to the community forum! I apologize if you’ve already considered this but to get the conversation started, does a merge function in the typePolicies entry for the normalized objects in question address your use case?