Hi! This is a plugin I hacked together, to add another field staleWhileRevalidate to Apollo Server's @cacheControl directive!
To use this, you'll need to disable the built-in plugin by setting cacheControl: false in your Apollo Server config.
Then, add this plugin, and initialize it with the option calculateHttpHeaders: true (which Apollo Server normally enables by default).
const server = new ApolloServer({
// ...
cacheControl: false,