Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

294 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apollo Client

Discourse Slack

Maven Central Snapshots Revved up by Develocity

🚀 Apollo Kotlin Normalized Cache

This repository hosts Apollo Kotlin's Normalized Cache.

  1. Add the dependencies to your project
// 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")
}
  1. Configure the compiler plugin
// 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())
  }
}

📚 Documentation

See the cache section of the Apollo Kotlin documentation:
https://www.apollographql.com/docs/kotlin/caching/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://www.apollographql.com/docs/kotlin/caching/migration-guide

Releases

Packages

Used by

Contributors

Languages