Open edlefebvre opened 4 weeks ago
As a workaround, I'm now using two @hasMany <=> @belongsTo
relationships with same auth settings used for the models to join.
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