Apollo Kotlin Normalized Cache Help

Welcome

This is Apollo Kotlin's Normalized Cache.

For an introduction please read the Normalized Cache documentation.

The Normalized Cache is now hosted in this dedicated repository and published at its own cadence and versioning scheme.

Compared to the previous version, this library brings:

The Normalized Cache in the Apollo Kotlin main repository will not receive new features - they are added here instead. In the future, the main repository version will be deprecated and then removed.

Use in your project

The Normalized Cache requires Apollo Kotlin v4.3.0 or later.

  1. Add the dependencies to your project

// build.gradle.kts dependencies { // For the memory cache implementation("com.apollographql.cache:normalized-cache:1.0.0-beta.1") // For the SQL cache implementation("com.apollographql.cache:normalized-cache-sqlite:1.0.0-beta.1") }
  1. Configure the compiler plugin

// build.gradle.kts apollo { service("service") { // ... // Add this plugin("com.apollographql.cache:normalized-cache-apollo-compiler-plugin:1.0.0-beta.1") { argument("com.apollographql.cache.packageName", packageName.get()) } } }
// For Apollo Kotlin v5 and later apollo { service("service") { // ... // Add this plugin("com.apollographql.cache:normalized-cache-apollo-compiler-plugin:1.0.0-beta.1") pluginArgument("com.apollographql.cache.packageName", packageName.get()) } }

If you're already using the main repository version, please consult the migration guide.

Last modified: 26 November 2025