apollographql / apollographql/apollo-server

Support caching extension data

Open
#3,860 2 comments 1 reaction 0 assignees View on GitHub
⛲️ feature 📚 good-first-issue 🧬 cache-control
Dominant language
TypeScript
Stars
14k
Forks
2k
Avg merge
2d 14h
Merged PRs (30d)
2

Description

Feature request for `apollo-server-plugin-response-cache` to support caching extension data.

**Use case:**
We are using extension data to power AB experiments. Rather than adding AB test metadata to our schema we are just returning it in extension data.

Currently this is incompatible with `apollo-server-plugin-response-cache` because it it disgards extension data before saving to the cache.

**Could this be a plugin?**
It's a feature request for the existing plugin `apollo-server-plugin-response-cache`

**Is there a workaround?**
Forking the plugin `apollo-server-plugin-response-cache` and extending it to cache and restore `extensions` along side `data`.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the apollo-server-plugin-response-cache implementation and its cache serialization and restoration flow. Verify how response data is currently stored, then make sure extension data is preserved alongside it and confirm cached responses restore both data and extensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.