@aws-cdk/aws-appsync-alpha: Issue defining resolver caching keys
See original GitHub issueDescribe the bug
I enabled PER_RESOLVER_CACHING for my appsync graphql api. I tried to defined a caching config for new Resolver
, but the cachingKeys are not getting deployed.
const resolver = new Resolver(scope, `Resolver`,
{
...config,
api: this,
cachingConfig: {
ttl: Duration.seconds(3600),
cachingKeys: ['$context.identity.claims.https://domain:prop'],
},
}
);
Expected Behavior
The resolver gets deployed as i have a valid cachingKey defined
$context.identity.claims.https://domain:prop
Current Behavior
Deployment of stack crashes with Error Caching keys need to start with $context.args, $context.arguments, $context.identity, or $context.source. (Service: AWSAppSync; Status Code: 400; Error Code: BadRequestException; Request ID: 37982d8a-0e08-4a7c-b4b5-35be0a001569; Proxy: null)
Reproduction Steps
Just try to define a resolver like i did.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.25.0
Framework Version
2.25.0
Node.js Version
v16.13.1
OS
Windows 10
Language
Typescript
Language Version
4.5.4
Other information
Same issue reported here https://github.com/aws/aws-appsync-community/issues/202
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Caching and compression - AWS AppSync
When you specify only a TTL and no caching keys, the behavior of the resolver is the same as full request caching. Cache...
Read more >The Benefits of Implementing Pre-Resolver Caching - Aircall
It's impossible for us to cache a Resolver that requires fresh data. After selecting our ideal use case, we worked with our Product...
Read more >Serverless Caching Strategies — Part 4 (AppSync)
How to use serverless caching strategies within your solutions, with code examples and visuals, ... You can specify a TTL and caching keys...
Read more >Cache Database Requests Across GraphQL Resolvers
We're going to build a cache that sits between the GraphQL resolvers and the ... Use GraphQL Data Loaders to Prevent Scaling Issues...
Read more >How I used DynamoDB as a long-term cache layer for AppSync
AppSync HTTP resolver with DynamoDB cache layer ... Then, I could have a resolver that looks into the table for a given cache...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I’m afraid that’s a limitation on the AppSync side. I’m closing this, as there is nothing we can do on the CDK side. Feel free to reopen it if anything changes.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.