-
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
Not Authorized to access on type Mutation #2848
Comments
Hi @palabadi-dg , there are some inconsistencies between the model name in the schema you provided and the model the client side code is trying to query. If you are making changes and testing queries in-between, please make sure the sandbox is running and applying those changes to the backend resource. Another thing to confirm is that the user is logged in as a Cognito User. The |
Hi Chris,
Thanks I will be looking into these issues and let you know
Kind Regards
…On Mon, Sep 9, 2024 at 8:31 PM chris ***@***.***> wrote:
Hi @palabadi-dg <https:/palabadi-dg> , there are some
inconsistencies between the model name in the schema you provided and the
model the client side code is trying to query. If you are making changes
and testing queries in-between, please make sure the sandbox is running and
applying those changes to the backend resource.
Another thing to confirm is that the user is logged in as a Cognito User.
The ownerDefinedIn auth rule requires authentication through Cognito.
—
Reply to this email directly, view it on GitHub
<#2848 (comment)>,
or unsubscribe
<https:/notifications/unsubscribe-auth/BH2J7DPUJGZTTK7TQF7L6KLZVXSPLAVCNFSM6AAAAABNXXQKOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZYHAYTGMZYGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi 👋 Closing this as we have not heard back from you. If you are still experiencing this issue and in need of assistance, please feel free to comment and provide us with any information previously requested by our team members so we can re-open this issue and be better able to assist you. Thank you! |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Did you figure this out? Facing a similar issue and am not sure what else to try, Thanks! |
Hey @blipps199 , can you share your schema and client code? |
Hi @chrisbonifacio! Thanks for the uber fast response. Keep in mind I replaced some sensitive info with placeholders. Here is the schema(schema.ql.ts) auto generated using this
Here is my data/resource.ts
Here is my front end code:
I know this might be overkill but I want to provide as much as I can. |
@chrisbonifacio I think this might have been what you were looking for. I just posted the queries file. I used this command to generate it API.ts
|
Amplify CLI Version
12.12.6
Question
Hi.
It seems I'm missing something in the authorization implementation in Amplify Gen2 Data access. I am getting a "Error: Not Authorized to access listContacts on type Query
resource.ts:
frontend effect code:
Error Message:
Error: Not Authorized to access listContacts on type Query
The text was updated successfully, but these errors were encountered: