amplify-cli: v4.41.2 | Owner field no longer available
Describe the bug
I upgraded the CLI from v4.16.1 to v4.41.2. When I upgraded, the owner field disappeared from the schema and available response parameters.
I noticed that if I set the auth directive entirely to owner, i.e. @auth(rules: [{ allow: owner }]), then it still works. If its more restrictive, e.g. @auth(rules: [{ allow: owner, operations: [create, update, delete] }]) then it is no longer available.
Amplify CLI Version v4.41.2
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 28 (13 by maintainers)
@jhockett do you have an update on this? Sorry if you’re not the right person to ask - it seems nobody is tracking this issue anymore…
In
v4.16.1- the version I am currently using, the owner field is automatically added to DynamoDB and added as an optional response parameter without any input required on my end. Its supposed to have anownerfield added by default but in the new version it’s not doing that.Here’s a link to the Amplify docs (relevant screenshot below):https://docs.amplify.aws/cli/graphql-transformer/auth#owner-authorization
Can you share your schema?
Hi @ammarkarachi, can we please get an update from your end. Just want to confirm somebody is addressing this issue…
Facing the same problem all the owner fields disappear causing errors in the app. Using amplify v4.43.0 Workaround:
{ allow: owner, ownerField: "owner", operations: [create, delete] }and adding the field manually to the schema definition.@ammarkarachi does it not make sense to just enable this by default?
Otherwise everyone who has been using it in the same way I have is going to run into this problem.
@Jordan-Eckowitz Thanks! got it
Sure you can send it over to amplify-cli@amazon.com be sure to have the issue number in the email subject