fixes #16340 we are updating the cache partially to prevent the flow of the corrupted fields into the cache the fields get corrupted during the mutation process potentially overriding the recoil cache as we are passing the `newRecordCache` directly in `upsertRecordsInStore`, the newRecordCache is thin and hence the recoil wipes out the fields that are undefined or empty we prevent this by extracting the partial data ( only the data which is being updated in the field ) and passing it to `upsertRecordsInStore`, as it only touched the specific fields and updates the data, leaving the other fields untouched. https://github.com/user-attachments/assets/5256bef7-70c3-47b3-b2ce-dd02ee1a2de8 --------- Co-authored-by: Arun kumar <arunkumar@Aruns-MacBook-Air.local> Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@@ -129,6 +129,11 @@ export const PERSON_FRAGMENT_WITH_DEPTH_ONE_RELATIONS = `
|
||||
node {
|
||||
__typename
|
||||
id
|
||||
note {
|
||||
__typename
|
||||
id
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,6 +159,11 @@ export const PERSON_FRAGMENT_WITH_DEPTH_ONE_RELATIONS = `
|
||||
node {
|
||||
__typename
|
||||
id
|
||||
task {
|
||||
__typename
|
||||
id
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user