You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have code that fetches arrays of data in the incremental responses using the @defer directive. When the previous data that is already cached is a superset of the data that is returned in the incremental response, the merging in of incremental data into existing data is incorrect. We expect the incremental data to replace the existing data entirely since it is missing some of the elements in the existing data, but this is not happening currently.
Link to Reproduction
Reproducible with a unit test as shown below:
Reproduction Steps
Please add:
it("should merge arrays of objects", function () {
const a = [{ a: 1, b: 2 }, { c: 3, d: 4 }];
const b = [{ a: 1, b: 2 }];
const merger = new DeepMerger();
expect(merger.merge(a, b)).toEqual([{ a: 1, b: 2 }]);
});
into mergeDeep.ts tests since this reproduces our use case.