
Facilitates experimentation with a normalized cache for Apollo without affecting the main stable repository. Suitable for non-critical projects due to potential data format changes and performance considerations.
This repository hosts Apollo Kotlin's Normalized Cache.
// build.gradle.kts
dependencies {
// For the memory cache
implementation("com.apollographql.cache:normalized-cache:$cacheVersion")
// For the SQL cache
implementation("com.apollographql.cache:normalized-cache-sqlite:$cacheVersion")
}// build.gradle.kts
apollo {
service("service") {
// ...
// For Apollo Kotlin v4
plugin("com.apollographql.cache:normalized-cache-apollo-compiler-plugin:$cacheVersion") {
argument("com.apollographql.cache.packageName", packageName.get())
}
// For Apollo Kotlin v5+
plugin("com.apollographql.cache:normalized-cache-apollo-compiler-plugin:$cacheVersion")
pluginArgument("com.apollographql.cache.packageName", packageName.get())
}
}See the project website for documentation:
https://apollographql.github.io/apollo-kotlin-normalized-cache/
The Kdoc API reference can be found at:
https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc
The migration guide if you're coming from the previous version:
https://apollographql.github.io/apollo-kotlin-normalized-cache/migration-guide.html
This repository hosts Apollo Kotlin's Normalized Cache.
// build.gradle.kts
dependencies {
// For the memory cache
implementation("com.apollographql.cache:normalized-cache:$cacheVersion")
// For the SQL cache
implementation("com.apollographql.cache:normalized-cache-sqlite:$cacheVersion")
}// build.gradle.kts
apollo {
service("service") {
// ...
// For Apollo Kotlin v4
plugin("com.apollographql.cache:normalized-cache-apollo-compiler-plugin:$cacheVersion") {
argument("com.apollographql.cache.packageName", packageName.get())
}
// For Apollo Kotlin v5+
plugin("com.apollographql.cache:normalized-cache-apollo-compiler-plugin:$cacheVersion")
pluginArgument("com.apollographql.cache.packageName", packageName.get())
}
}See the project website for documentation:
https://apollographql.github.io/apollo-kotlin-normalized-cache/
The Kdoc API reference can be found at:
https://apollographql.github.io/apollo-kotlin-normalized-cache/kdoc
The migration guide if you're coming from the previous version:
https://apollographql.github.io/apollo-kotlin-normalized-cache/migration-guide.html