apollo-feature-requests
apollo-feature-requests copied to clipboard
Allow merging normalized items
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.