By default, Hive Gateway maintains a parsing and validation cache. If requests contain documents
that have been executed before, they will not be parsed and validated again.
Using the parser cache can improve performance up to ~60%, and using the validation cache up to ~50%
(based on benchmarks).
This behavior is built-in and can be optionally disabled using the parserAndValidationCache
options:
gateway.config.ts
import { defineConfig } from "@graphql-hive/gateway";export const gatewayConfig = defineConfig({ // disable parse and validate caching parserAndValidationCache: false,});
Furthermore, you can provide your own cache store to both of these plugins by implementing the
following interface: