Closed jamontesg closed 1 month ago
Hi @jamontesg, your update function looks good to me. Do you see this behavior on iOS too?
Thanks @Equartey IOS --> ok Android --> error
(test done in emulators) Please tell me if you need more info
Hi @Equartey, any news about this issue ?
Hi @jamontesg, no updates yet. Still need to reproduce the error. We will provide an update from our investigation we possible.
Hi @jamontesg, small update I was able to reproduce the issue, and believe this to be a bug. Will be working next finding the root cause and solution. Updates to follow.
thanks @Equartey , tell me if you need more info from my side.
@jamontesg we will let you know if there is any information you need, thanks.
thanks @khatruong2009
@jamontesg we are working with the Amplify Android team to investigate this issue and will provide you update as we have them. thanks for your patience.
Hi @jamontesg, sorry for the delay.
I investigated this with both the Amplify Swift and Android teams, and we have determined that the observed error is expect. Update mutations within DataStore require the delete permission. Which is due to our libraries including null
in the request variables for all fields on a model not explicitly specified with a value. This is already the case in native Android and Swift DataStore.
To explain what was seen here, Android was working correctly by returning the error. The observation that Swift was working was the result of a bug and will be corrected to mirror behavior observed on Android.
I have an open PR https://github.com/aws-amplify/amplify-flutter/pull/5370 to address this. I will notify you here when its available.
Again, apologies for the delay, please let us know if you have any additional questions.
Thanks @Equartey , if. Android is working properly. For what is update permission ? I think that update permissions is useless.
Hi @jamontesg, while using DataStore I understand that conclusion. Unfortunately, its currently a technical requirement when using DataStore.
If you want to use the update permission how you were initially thinking, I recommend using the API category escape hatch to create your own GraphQL requests. The generated requests by the library make assumptions about what how to handle null values.
Ok @Equartey, thanks for your time.
Closing this issue out as it was released in v2.4.1
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
Description
I have a table using authorization rules with cognito groups
profile Operative has. permission "update" but not. delete.
when I try to update a item whit this code:
This code only update a field "images" and generates the following error:
but, if I add a. "delete" permission
update record works fine.
Does my update function have any errors? What are the auth rules for. update (without delete permission) ?
Kind regards Thanks. for your. time
Categories
Steps to Reproduce
configure DynamoDB/ API /. AUTH with cognate group access. define a auth rule. with update but without delete permission tries to. update a item
Screenshots
No response
Platforms
Flutter Version
3.22.2
Amplify Flutter Version
2.2.0
Deployment Method
Amplify CLI
Schema