-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: make Logging property for GraphQLApi #2971
Conversation
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.
Overall looks good. Just some nit comments.
The most recent commits should address the majority of comments that were focused on type checking and reducing branching. I separated the logic for when This reduced the nested if branches and repeated type checks, and also separates the logic in what should be a more readable manner. |
0bc8f53
Issue #, if available
Description of changes
Created new property
Logging
inServerless::GraphQLApi
resource, which allows customers to specify their logging implementation in the SAM template.Maps to the
LogConfig
property of theAppSync::GraphQLApi
resource. Includes defaults for 2 properties:CloudWatchLogsRoleArn
: If not defined, creates a role with an AWS managed AppSync CloudWatch policy and attaches to theGraphQLApi
resource.FieldLogLevel
: Defaults toALL
.This change also includes a small refactor of the error transform tests for
GraphQLApi
, bundling them all inerror_graphqlapi.yaml
.Description of how you validated changes
Modified and created transform tests to work with
Logging
property.Checklist
Examples?
Please reach out in the comments if you want to add an example. Examples will be
added to
sam init
through aws/aws-sam-cli-app-templates.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.