-
Notifications
You must be signed in to change notification settings - Fork 77
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
Mutations are not authorized when using manyToMany relation and cognito user groups auth | Amplify v6 #2905
Comments
As a workaround, I'm now using two |
Hi @edlefebvre 👋 thanks for raising this issue! I will try to reproduce and report back with any findings |
Hi @edlefebvre Since this is reproducible in the AppSync console, it is likely a graphql transformer issue. Auth rules/resolvers are generated at build-time so I transferred this over to the category-api repo for better support. |
Before opening, please confirm:
JavaScript Framework
Vue
Amplify APIs
Authentication, GraphQL API
Amplify Version
v6
Amplify Categories
auth, api
Backend
Amplify CLI
Environment information
Describe the bug
I can't write mutation for manyToMany relations with Amplify v6, I get an unauthorized error.
I've seen this bug (13226) which could be related, except I don't use Datastore.
Consider this graphql schema:
Using a user with a cognito group 'Manager' that as CRUD rights on these two models, I'm able to create TestAuth and TestAuthSite. But createTestAuthSiteLinks mutation throws an error
Not Authorized to access createTestAuthSiteLinks on type Mutation
.I tried this directly in AppSync and in my app, both failed.
Any help much appreciated!
Expected behavior
Should be able to write mutations for linking manyTomany relations when models to join have both auth set up with cognito groups.
Reproduction steps
Code Snippet
No response
Log output
No response
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
The text was updated successfully, but these errors were encountered: