We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83b5473 commit d81ba4fCopy full SHA for d81ba4f
app/src/main/java/guide/graphql/toc/data/Apollo.kt
@@ -1,11 +1,17 @@
1
package guide.graphql.toc.data
2
3
import com.apollographql.apollo.ApolloClient
4
+import com.apollographql.apollo.cache.normalized.lru.EvictionPolicy
5
+import com.apollographql.apollo.cache.normalized.lru.LruNormalizedCacheFactory
6
7
object Apollo {
8
val client: ApolloClient by lazy {
9
+ val cacheFactory =
10
+ LruNormalizedCacheFactory(EvictionPolicy.builder().maxSizeBytes(10 * 1024 * 1024).build())
11
+
12
ApolloClient.builder()
13
.serverUrl("https://api.graphql.guide/graphql")
14
+ .normalizedCache(cacheFactory)
15
.build()
16
}
-}
17
+}
0 commit comments