GraphQL Edge Caching

Edge caching is a performance optimization strategy implemented in your GraphQL API to cache responses in proximity to the end-users. This technique significantly cuts down overall latency, augmenting the speed of data delivery.

You can use Grafbase as a GraphQL Edge Cache for any connected data source.

If you only have one data source, you can disable the namespace so your current application can use Grafbase without any code change! Just update the URL to your GraphQL API to be Grafbase, and you're good to go.

import { config, graph } from '@grafbase/sdk' const g = graph.Standalone() export default config({ graph: g, cache: { rules: [ { types: ['Query'], // Cache everything maxAge: 60, staleWhileRevalidate: 60, }, ], }, })

Learn more about the config, rules, scopes and state of edge caching to make your data sources fast!

We've made it super easy to get started with some popular APIs.

If there's something not on the list but you think it should be, you can submit a pull request.

Was this page helpful?