aerogear / offix

GraphQL Offline Client and Server
https://offix.dev
Apache License 2.0
760 stars 45 forks source link

Default UseClient conflict strategy can pick outdated data #116

Closed StephenCoady closed 5 years ago

StephenCoady commented 5 years ago

Bug Report

Currently, conflict processor is creating an issue where it updates issues in the queue meaning conflicts (that should be triggered) are not.

Also, the strategy interface should be extended to allow the passing of additional necessary data.

The default implementation is also incorrect and has the potential to cause data loss as server data is overwritten with base data. To combat this the base should not be used in the resolution as it is not needed. Instead we can apply the clientDiff data to the server data returned with the conflict. This ensures only up to date data is passed with the next mutation in the queue.

Currently working on this.

StephenCoady commented 5 years ago

Fixed in https://github.com/aerogear/offix/pull/117