AWS Aug 31, 2021

Implementing caching for pipeline resolvers in AWS AppSync GraphQL APIs

Article Summary

Eric Robertson from AWS AppSync reveals how pipeline resolver caching slashed database requests by 99% for some customers. If your GraphQL API is hitting backend services too hard, this changes everything.

AWS AppSync just expanded its managed caching capabilities to support pipeline resolvers, which can orchestrate up to 10 data source calls in a single API request. Previously, only unit resolvers could leverage server-side caching. This tutorial walks through implementing the new feature with a practical blogging platform example.

Key Takeaways

Critical Insight

AppSync's new pipeline resolver caching delivers sub-10ms response times for complex multi-source queries that previously took 800ms, with dramatic reductions in backend load.

The article includes a clever trick for caching trending posts by country that most developers would miss on their first implementation.