Détail du package

@apollo/server-plugin-response-cache

apollographql202.2kMIT5.0.0

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

  • #8076 5b26558 Thanks @valters! - Fix some error logs to properly call logger.error or logger.warn with this set. This fixes errors or crashes from logger implementations that expect this to be set properly in their methods.

  • Updated dependencies [5b26558, 100233a, 100233a, 100233a, 100233a]:

    • @apollo/server@5.0.0

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

  • #7049 3daee02c6 Thanks @glasser! - Raise minimum engines requirement from Node.js v14.0.0 to v14.16.0. This is the minimum version of Node 14 supported by the engines requirement of graphql@16.6.0.

  • Updated dependencies [3daee02c6, 3daee02c6]:

    • @apollo/server@4.0.1

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.