feat(appsync): queryDepthLimit and resolverCountLimit props on GraphqlApi#29182
feat(appsync): queryDepthLimit and resolverCountLimit props on GraphqlApi#29182mergify[bot] merged 7 commits intoaws:mainfrom
Conversation
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
|
||
| ## Query Depth Limits | ||
|
|
||
| There are times during which you may want more granular control over how the API functions during an operation. One such control is adding a limit to the amount of nested levels a query may process. By default, queries are able to process an unlimited amount of nested levels. Limiting queries to a specified amount of nested levels has potential implications for the performance and flexibility of your project. |
There was a problem hiding this comment.
please split this up into a sentence per line so the raw markdown is more amenable to look at.
| const api = new appsync.GraphqlApi(this, 'api', { | ||
| name: 'LimitQueryDepths', | ||
| definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.schema.graphql')), | ||
| queryDepthLimit: 2 |
There was a problem hiding this comment.
| queryDepthLimit: 2 | |
| queryDepthLimit: 2, |
| const api = new appsync.GraphqlApi(this, 'api', { | ||
| name: 'LimitResolverCount', | ||
| definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.schema.graphql')), | ||
| resolverCountLimit: 2 |
There was a problem hiding this comment.
| resolverCountLimit: 2 | |
| resolverCountLimit: 2, |
| /** | ||
| * A number indicating the maximum number of resolvers that should be accepted when handling queries. | ||
| * | ||
| * @default - No Limit |
There was a problem hiding this comment.
https://docs.aws.amazon.com/appsync/latest/APIReference/API_GraphqlApi.html
"The default value is 0 (or unspecified), which will set the limit to 10000"
| * @default IntrospectionConfig.ENABLED | ||
| */ | ||
| readonly introspectionConfig?: IntrospectionConfig; | ||
|
|
There was a problem hiding this comment.
both of these new props have lower and upper bounds according to the docs: https://docs.aws.amazon.com/appsync/latest/APIReference/API_GraphqlApi.html
They should be documented in their docstrings, checked for at synth time, and also have a unit test for each testing the boundary
Pull request has been modified.
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
1 similar comment
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…lApi (aws#29182) ### Issue # (if applicable) No open issue. Cr was based on aws#28500 ### Reason for this change Appsync added two additional fields documented in their CFN [here](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-resolvercountlimit) that were not previously supported in the L1 construct. ### Description of changes Addition of field `queryDepthLimit` and `resolverCountLimit` ### Description of how you validated changes Unit tests and integration tests were run locally. Additionally a sample app was deployed to validate these features. ### Checklist - [ x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Issue # (if applicable)
No open issue. Cr was based on #28500
Reason for this change
Appsync added two additional fields documented in their CFN here that were not previously supported in the L1 construct.
Description of changes
Addition of field
queryDepthLimitandresolverCountLimitDescription of how you validated changes
Unit tests and integration tests were run locally. Additionally a sample app was deployed to validate these features.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license