-
Notifications
You must be signed in to change notification settings - Fork 79
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
Custom types can't have authorization modes added to them, meaning if you have a custom mutation and multiple auth modes, response types won't be accessible #2486
Comments
Hey👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂 |
I tested the type EchoResponse
{
content: String!
executionDuration: Float!
}
type Query {
echo(content: String!): EchoResponse @function(name: "echo") @auth(rules: [{allow: public, provider: apiKey}])
} I'm going to assume there's a disconnect in the transformer, so I'll unassign myself and mark this |
Scratch what I said above. I get the issue now. The Custom Type, i.e. |
PR with fix opened in |
This issue is now closed. Comments on closed issues are hard for our team to see. |
@aherschel - thanks for bringing this to our attention, man! This is now automatically handled in |
Dope, thanks for confirming!
…On Wed, May 1, 2024 at 10:32 AM Ivan Artemiev ***@***.***> wrote:
@aherschel <https://github.com/aherschel> - thanks for bringing this to
our attention, man!
This is now automatically handled in @aws-amplify/data-schema@^1.1.2.
Any custom types that are referenced by custom operations return types
inherit those custom operation(s)' auth rules
—
Reply to this email directly, view it on GitHub
<#2486 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG7WPWW6NJUXXEDODCWGG3ZAERJNAVCNFSM6AAAAABGTBARKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYHAYTCMZYHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Environment information
Description
This issue may be better routed to the graphql-cdk repo, but dropping here as I think it relates to Gen2 release.
Basically, the authmode configured on the ref'd type isn't having the relevant auth modes enabled on the response types. I had to manually update the schema post-hoc to add the @aws_api_key annotation to the schema after deploying to test.
The text was updated successfully, but these errors were encountered: