appsync: API level cache config
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
The `aws_appsync` module does not include any L2 constructs to enable caching at the API level. There is a `CachingConfig` construct but that is specifically for resolvers and cannot be enabled if the API does not have caching enabled itself.
### Use Case
There is no way to enable caching on a graphql API outside of cfn constrcuts. I would like to enable this directly in the GraphqlApi construct or via it's own L2 construct.
### Proposed Solution
Ideally, it could be configured directly in the GraphqlApi construct:
```typescript
const api = new appsync.GraphqlApi(this, 'EventBridgeApi', {
name: 'EventBridgeApi',
definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.eventbridge.graphql')),
cacheConfig: appsync.ApiCacheConfig(...)
});
```
### Other Information
_No response_
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.153.0
### Environment details (OS name and version, etc.)
MacOS 14.6.1, Node v18
Contributor guide
Research direction
Start at the aws_appsync GraphqlApi entry point and compare it with the existing CachingConfig construct, which currently applies to resolvers. Define the API-level cache configuration described in the proposal, and consider how it integrates with GraphqlApi. Done means an API can enable caching through the L2 API rather than only through CloudFormation constructs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql, typescript
- Domain
- api, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100