Diffing the data model after saving on the backend #1501
Labels
fe-v4
Issues to be solved before v4 goes gold
kind/breaking-change
Issue/pull request containing a breaking change
kind/feature-request
New feature or request
Description
Currently we send the data model to the backend, which saves it to storage, and sometimes makes changes to it in the process. The backend then diffs the changes using
JsonHelper
in order to produce achangedFields
the app-frontend can use to populate these changes back into the data model.We should instead swap the responsibility so that the backend instead sends us the entire data model (as it looks after their changes to it), we can produce a diff from what we sent the backend and what we got back, and inject those changes into the current data model (in a way that won't overwrite any changes we've currently made to the data model while the saving request was processing).
This has a few advantages over the current method:
Something like this obviously needs to be coordinated with the backend libraries in app-lib-dotnet.
Additional Information
The text was updated successfully, but these errors were encountered: