Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@apollo/server-plugin-response-cache

apollographql202.2kMIT5.0.0TypeScript support: included

Apollo Server full query response cache

readme

Response Cache plugin

This Apollo Server response cache plugin implements a full GraphQL query response cache.

  • Add the plugin to your ApolloServer's plugins list
  • Set @cacheControl hints on your schema or call info.cacheControl.setCacheHint in your resolvers
  • If the entire GraphQL response is covered by cache hints with non-zero maxAge, the whole response will be cached.

This cache is a full query cache: cached responses are only used for identical requests.

See the docs for details.

changelog

@apollo/server-plugin-response-cache

5.0.0

Major Changes

  • Drop support for Node.JS v14, v16, and v20.

Patch Changes

4.1.4

Patch Changes

4.1.3

Patch Changes

  • #7614 4fadf3ddc Thanks @Cellule! - Publish TypeScript typings for CommonJS modules output.

    This allows TypeScript projects that use CommonJS modules with moduleResolution: "node16" or moduleResolution: "nodeNext" to correctly resolves the typings of apollo's packages as CommonJS instead of ESM.

4.1.2

Patch Changes

4.1.1

Patch Changes

4.1.0

Minor Changes

  • #7241 d7e9b9759 Thanks @glasser! - If the cache you provide to the cache option is created with PrefixingKeyValueCache.cacheDangerouslyDoesNotNeedPrefixesForIsolation (new in @apollo/utils.keyvaluecache@2.1.0), the fqc: prefix will not be added to cache keys.

4.0.3

Patch Changes

  • #7187 3fd7b5f26 Thanks @trevor-scheer! - Update @apollo/utils.keyvaluecache dependency to the latest patch which correctly specifies its version of lru-cache.

4.0.2

Patch Changes

4.0.1

Patch Changes

4.0.0

Initial release of @apollo/server-plugin-response-cache with support for Apollo Server 4. The version of this plugin designed for Apollo Server 2 and 3 was named apollo-server-plugin-response-cache.