GraphQL Extra Cache Module
This module enhances the caching capabilities of GraphQL requests in a Drupal application. It is designed to work with the graphql and graphql_core_schema modules.
Features
- The
graphqlmodule already has a caching layer, but it is implemented too late in the request lifecycle. - This module adds a new cache layer that is implemented earlier in the request lifecycle.
- The module skips parsing and validating the whole POST body of the request, which can be a performance bottleneck.
- If the same GraphQL query is requested multiple times, the response will be cached and served from the cache without any additional processing.
This results in a huge performance boost.
Installation
- Download and enable the `graphql_extra_cache` module in your Drupal application.
- Ensure that the
graphqlandgraphql_core_schemamodules are also enabled.
Usage
Once the module is enabled, it alters graphql the route of graphql_core_schema and starts serving from cache.
Note
This module is designed to work with the graphql and graphql_core_schema modules. If you have your own schema, you still can use it, but you need to write your own RouteSubscriberto match and alter the route and add the cache layer.
Supporting organizations:
Funding
Project information
Maintenance fixes only
Considered feature-complete by its maintainers.- Project categories: Decoupled
- Ecosystem: GraphQL Core Schema
99 sites report using this module
- Created by ayalon on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.

