Closed DevTGhosh closed 3 years ago
Hello! 👋 Thank you for raising this issue. As we look into this, could you please try upgrading DS to latest @2.9.16 if you haven't already. We just released some changes that fix certain issues with the mutation queue.
If that doesn’t help, could you please confirm if you experience the issue when using an older version, such as @2.9.3?
Yeah this was fixed with @aws-amplify/datastore@2.9.16
.
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
DataStore
Amplify Categories
api
Environment information
Describe the bug
When using Datastore along with optimistic concurrency it is only syncing the last change that has been made to the datastore even though the datastore has all changes being made to it.
Expected behavior
When a model is being worked worked upon multiple times datastore keeps a list of all the changes and tries to update them all with optimistic concurrency when syncing with backend.
Reproduction steps
For e.g.
After sync
clientName: null, projectName: null, isStarred: false, _version: 1
Go offline
1st change
clientName: "Check",
Datastore updated Value isclientName: "Check", projectName: null, isStarred: false, _version: 1
2nd change
isStarred: true
, Datastore updated value isclientName: "Check", projectName: null, isStarred: true, _version: 2
3rd Change
projectName: "Project Name Change"
, Datastore updated value isGo online: Graphql sync api query variables are
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response