DEV Community

Vadorequest
Vadorequest

Posted on

2 1

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 :)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more