apollo-feature-requests icon indicating copy to clipboard operation
apollo-feature-requests copied to clipboard

Allow merging normalized items

Open epmatsw opened this issue 9 months ago • 1 comments

Right now if you define a typepolicy for a Thing like so:

Thing: {
    merge(incoming, existing) => {}
}

and Thing is normalized, incoming and existing are often refs, and usually point to the same ref. That makes doing a merge pretty much impossible since the data is (presumably) already written to the cache. It would be nice to be able to intercept that and handle the merge before the normalization is completed.

epmatsw avatar Feb 04 '25 20:02 epmatsw