An alternative cache implementation for Apollo Client (v0.8.16) optimized for heavy GraphQL payloads. Uses an immutable, normalized graph structure enabling direct references and constant-time reads, contrasting with Apollo's default InMemoryCache which rebuilds results on every read. Currently in early development with limited support for union types and writeData. Part of Apollo Client ecosystem, ships TypeScript types, and requires @apollo/client ^3.1.2 as a peer dependency.
npm install apollo-cache-hermesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic setup of Apollo Client with Hermes cache and a sample query using TypeScript.
Avoid relying on type-based cache differentiation or use InMemoryCache if union types are required.
Replace writeData calls with writeQuery or cache.modify patterns.
Expect extra fields in query results. Consider using data masking or access only known fields.
Pin to a specific version and test upgrades. Use CacheContext source as documentation.
Use import { Hermes } from 'apollo-cache-hermes'Run npm install apollo-cache-hermes and check the import path is correct.