DEV Community

Vadorequest
Vadorequest

Posted on

GraphQL/GraphCMS Cache Contingency

I have several businesses that rely on a particular GraphQL endpoint. This endpoint is managed by a third party provider: https://graphcms.com/ (a Headless CMS that provides a CMS, and an API)

Along the way, I noticed that sometimes, the endpoints gets unreliable. Often, it's because GraphCMS infrastructure is failing due to their own provider failures (usually AWS).

They can't do much about AWS failure (kinda hard to do what they do, that's why we use them in the first place, right?) and they don't have a "failure mitigation" in place yet, so I had to build one. I basically built a cache failover on top of the GraphQL endpoint.

I built https://github.com/UnlyEd/GraphCMS-cache-boilerplate with GraphCMS in mind, only to figure out kinda later that it could be used for any GraphQL endpoint, independently of the provider. (self-hosted, SaaS, etc.)

It's basically a self-hosted service (using AWS Lambda/API GW). I invite you to take a look and let me know what you think, I believe it could be useful to many folks out there so it's released under MIT license :)

Top comments (0)