aws-amplify / amplify-swift

A declarative library for application development using cloud services.
Apache License 2.0
443 stars 192 forks source link

Add the ability to replay failed mutations #3490

Open gbitaudeau opened 7 months ago

gbitaudeau commented 7 months ago

Is your feature request related to a problem? Please describe.

As describe on #3259 , mutation errors can happen for various reasons.

Even through the DataStore does its best effort to replay mutations in case of errors, sometimes mutations can't be replayed and in this case the DataStore content is no longer the same as the server content with no way to correct it.

Describe the solution you'd like

A nice feature would be to help developers to replay or correct failed mutations.

Few ideas to do that :

Describe alternatives you've considered

Actually, to "replay" mutation we follow this flow :

  1. clear the DataStore
  2. wait it to be full sync
  3. compare it with our local base and replay all missing creates / updates / deletes again (using DataStore.save/delete )

Is the feature request related to any of the existing Amplify categories?

DataStore

Additional context

No response

github-actions[bot] commented 7 months ago

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!