-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(api-graphql): server side iam auth mode is ineffective #12992
Conversation
05a2f3a
to
c99632c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AllanZhengYP Please review this, ty!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! What's the difference of this change v.s. using the server version of internal post? https://github.com/aws-amplify/amplify-js/blob/hui/fix/api-graphql/server-side-iam/packages/api-rest/src/internals/server.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GQL impl. doesn't pick the client vs server versions, it just passing the Amplify instances down into the post API.
c99632c
to
9870bb5
Compare
9870bb5
to
0b189ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The internal POST handler part of change looks good to me! Thank you @HuiSF
Description of changes
post
function for api-graphql to make it server side usable (can inject the instance ofAmplifyClassV6
from the server context)graphql
methodwrapper
implementation to ensure it's anawait
-able function so Amplify server context can ensure destroying context only after this function has completedIssue #, if available
#12984
#12931
#12867
Description of how you validated changes
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.