-
Notifications
You must be signed in to change notification settings - Fork 198
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
Amplify Gen 2 Data field-level authentication disables create on key field #3818
Comments
Hey @concavegit, Thanks for raising this. We have followup question, can you please verify this in AppSync console and let us know the results. |
Hello @AnilMaktala , I found that the AppSync console works as expected. The issue seems to be with the Swift query. I've verified with a debugger that the result below contains the error I have in the description, so I don't think it is due to code I manually created. let result = try await Amplify.API.mutate(
request: .create(
scanProcessingWorkflow,
authMode: .amazonCognitoUserPools
)
) |
Hello, just checking if there are any updates |
Hey @concavegit , Sorry for the delay, and thanks for the confirmation. Does this model have an |
Hello Anil, yes the model has an |
Hello, @AnilMaktala, just checking on this |
Hi @concavegit, for the API call let result = try await Amplify.API.mutate(
request: .create(
scanProcessingWorkflow,
authMode: .amazonCognitoUserPools
)
) When using runtime auth mode, this will use Amplify.Auth to retrieve the cognito access token to add to the request. Can you confirm the following?
If you need more assisistance, please provide the entire log with verbose logging enabled ( |
Also, |
I have the same issue. What I did to fix it was to add the id field into the TypeScript file description of the model |
Thanks for your input, @ipodishima! At this point a few people have provided some possible solutions and it's been a month without follow up from OP so will close this. If you're still running into issues, feel free to reopen. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
How did you install the Amplify CLI?
NPM
If applicable, what version of Node.js are you using?
v22.1.0
Amplify CLI Version
1.0.3
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes, but I added TTL following the official documentation.
Describe the bug
I have a schema like this:
If I create this query in Swift
Then I get this error
Expected behavior
I expect to create operation so succeed.
Reproduction steps
allow.publicApiKey()
and wait for the deployment to succeed. Then revert the model-level authorization and wait for that deployment to succeed.Project Identifier
No response
Log output
No response
Additional information
This is similar to aws-amplify/amplify-category-api#1714 which was fixed, but now this is for Amplify Gen 2.
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: