-
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
Relation ship when authorization is owner cannot access a parent upon creation #2859
Comments
Hey,👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂 |
Hey @ipodishima, Thanks for raising this. As mentioned in the documentation, you need to query the relation data separately. |
Ok @AnilMaktala |
Hey @ipodishima, Are you using subscriptions in your app? If not, you can disable them to resolve this issue. |
Hey @AnilMaktala no I'm not using subscriptions. I mean now yes, but not when I opened the bug. |
@AnilMaktala I am also running into this issue. I'm not using subscriptions either. Interestingly creating my object with nil for all the relationships it has in the appSync console works, I just get the following error in in my frontend:
Are there any updates here? Edit: Some context: This query to create a model in the AppSync console works:
However, in my iOS app,
shows the error I described. |
My workaround is to grab the returned MyModel from the partial in the result. |
Hey @ipodishima and @concavegit, Our team will work on modifying the default mutation logic in the codegen to eliminate the inclusion of child models. |
How did you install the Amplify CLI?
npx
If applicable, what version of Node.js are you using?
v20.6.1
Amplify CLI Version
npx ampx --version 1.2.5
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
Describe the bug
I took the example given in the documentation and just changed the authorization to
owner
I can run a mutation for creating a team with success.
But when I run this mutation
This is what I get
Note:
Running the query just after
works (aka John was created, but the response had an error)
Also, when I run
There are no issues
Expected behavior
When using
allow.authenticated()
I do not have this issue. I expect the same behavior when auth isowner()
Reproduction steps
Simply creating a new model with team and member like in the documentation, but with owner for the auth for both team and member
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: