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(graphql-auth-transformer): protection for connection types #5655
fix(graphql-auth-transformer): protection for connection types #5655
Conversation
When generating auth directives to protect fields decorated by @connection we now protect the operation including its return type instead of protecting only the field. This is important for the case where queries are not defined on the nested model type since they wont be generated for the schemas Query.operation. "fix aws-amplify#4874", "fix aws-amplify#5510"
Codecov Report
@@ Coverage Diff @@
## master #5655 +/- ##
==========================================
+ Coverage 57.89% 57.94% +0.04%
==========================================
Files 410 410
Lines 18709 18709
Branches 3738 3543 -195
==========================================
+ Hits 10831 10840 +9
- Misses 7194 7205 +11
+ Partials 684 664 -20
Continue to review full report at Codecov.
|
Thanks for the Contribution @chrisjprior. It looks good to me to add necessary auth directives when the query argument is null in @model directive. I missed this case when I was trying to repro this issue #4874 |
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.
LGTM!
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
When generating auth directives to protect fields decorated by @connection we now protect the
operation including its return type instead of protecting only the field. This is important for the
case where queries are not defined on the nested model type since they wont be generated for the
schemas Query.operation.
"fix #4874", "fix #5510" "fix #6104"
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.