Skip to content
GraphPilotPublic

About

Practical GraphQL caching examples, runnable demos, and integration guides for GraphPilot.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

GraphPilot

GraphPilot Examples

Runnable GraphQL caching examples and integration guides for GraphPilot, the managed GraphQL edge cache.

Website · Documentation · Quickstart

About

GraphPilot sits in front of your GraphQL API and caches responses at the edge, close to your clients. It takes cache lifetimes from your schema or your origin's Cache-Control header, and when a mutation returns an object, it purges every cached response that contained that object.

The examples in this repository show that in practice. Each one comes with a GraphQL origin you can run on its own, without a GraphPilot account, and the steps to put GraphPilot in front of it.

Examples

A Book GraphQL API (GraphQL Yoga), called directly and through the GraphPilot edge cache, with the same queries and the same mutation on both endpoints.

  • Compare cache MISS, HIT and mutation-driven invalidation between the direct origin and GraphPilot
  • Ready-made requests for the terminal, JetBrains IDEs and VS Code
  • Ways to give the origin a public URL: a free tunnel (ngrok or Cloudflare), Render, or your own server
  • A separate, hand-written in-memory cache for learning how GraphQL POST caching works

Accompanies the article "How to Cache GraphQL POST Requests: A Practical Guide".

Open in StackBlitz Deploy to Render

Getting started

Every example lives in its own folder, with its own package.json and README:

git clone https://github.com/GraphPilot/examples.git
cd examples/graphql-post-caching
npm install
npm run origin

The example's README takes it from there: running the requests, putting GraphPilot in front of the origin, and comparing both endpoints.

Requirements depend on the example; the GraphQL POST caching example needs Node.js 22.15 or newer.

Repository layout

Path What it is
graphql-post-caching/ The GraphQL POST caching example
render.yaml Render Blueprint behind the "Deploy to Render" button. It lives at the repository root because the button reads it there, and deploys only the Book origin of graphql-post-caching/
.github/assets/ Logos used in the READMEs

Learn more

License

MIT

About

Practical GraphQL caching examples, runnable demos, and integration guides for GraphPilot.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages