New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*Edit* Graphql Update Appending Data to Arrays instead of overwriting #5541
Comments
Another issue that goes with this is that when I set the values to be null or empty the action goes through but never actually makes the arrays empty or null.
|
Would using |
Also I should note that looking at other issues online I noticed some people had issues because of @versioned and I have the version stamps on my DynamoDB items and yet I never added the version tag to my schema.... |
Fixed it. The issue is caused by the conflict detection. Although I removed the conflict detection through the CLI I had to manually remove
|
Hi, we are actually facing the same problems, using DataStore (which requires us to use conflict detection) and hence removing that is not a probable solution for us. I hope that description is somewhat understandable, if not, please let me know and I will try to elaborate in more detail. |
@ondojo do you mean the items are concatenated even though they are the same? Also could you share your tranform.conf file? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. Please open a new issue if you are still encountering problems. |
I have this same problem too! With automerge the data objects concatenate every time rather than replace, which leads to huge issues. |
after some more digging into the docs of app sync, i have found this: https://docs.aws.amazon.com/appsync/latest/devguide/conflict-detection-and-sync.html the leads me to believe, that everything works as it is supposed to.
What we did, was to change the conflict resolution to |
Thanks for getting back to me so fast @crolly! I'm new to conflict resolution - would this conflict resolution need to be done in the callback from failed GraphQL mutations made by the client? I'm doing most of the saves through Amplify DataStore so it's largely a black box to me :( |
@CarbnJacob yes. take a look here: https://docs.amplify.aws/lib/datastore/conflict/q/platform/js#custom-configuration you can specify your own conflictHandler with |
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 |
I noticed a bug today, while I was working on an editor. When running the update mutation, my properties that use arrays are duplicated leaving me with the original array and the new array stored together. How the editor works is I get the data for x object, set the state and then with the same state if the user modified it and confirms it then it updates. I was under the impression it would override the values
The text was updated successfully, but these errors were encountered: