Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1c27b34

Browse files
authored
Merge pull request#1664 from joreilly/bump-apollo-cache
Bump Apollo Cache to 1.0.0-beta.0
2 parents6e1740c +7d1586e commit1c27b34

File tree

4 files changed

+7
-21
lines changed

4 files changed

+7
-21
lines changed

‎gradle/libs.versions.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ activity-compose = "1.11.0"
1212
androidx-lifecycle ="2.9.4"
1313
androidx-datastore ="1.1.7"
1414
apollo ="4.3.3"
15-
apollo-cache ="1.0.0-alpha.6"
15+
apollo-cache ="1.0.0-beta.0"
1616
compose ="1.9.2"
1717
compose-hot-reload ="1.0.0-beta09"
1818
composeLifecyleRuntime="2.9.4"

‎shared/build.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ apollo {
238238
}
239239

240240
plugin(libs.apollo.normalized.cache.compiler.plugin.get()) {
241-
argument("packageName", packageName.get())
241+
argument("com.apollographql.cache.packageName", packageName.get())
242242
}
243243
}
244244
}

‎shared/src/commonMain/graphql/extra.graphqls‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
extendschema
2+
@link(url:"https://specs.apollo.dev/kotlin_labs/v0.3")
23
@link(
3-
url:"https://specs.apollo.dev/kotlin_labs/v0.3",
4-
import: ["@typePolicy","@fieldPolicy"]
5-
)
6-
@link(
7-
url:"https://specs.apollo.dev/cache/v0.1",
8-
import: ["@cacheControl","@cacheControlField"]
4+
url:"https://specs.apollo.dev/cache/v0.3",
5+
import: ["@typePolicy","@fieldPolicy","@cacheControl","@cacheControlField"]
96
)
107

118
extend type Venue

‎shared/src/commonMain/kotlin/dev/johnoreilly/confetti/ApolloClientCache.kt‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ import com.apollographql.apollo.exception.ApolloException
1010
importcom.apollographql.apollo.exception.ApolloHttpException
1111
importcom.apollographql.apollo.interceptor.ApolloInterceptor
1212
importcom.apollographql.apollo.interceptor.ApolloInterceptorChain
13-
importcom.apollographql.cache.normalized.api.CacheControlCacheResolver
14-
importcom.apollographql.cache.normalized.api.SchemaCoordinatesMaxAgeProvider
1513
importcom.apollographql.cache.normalized.apolloStore
1614
importcom.apollographql.cache.normalized.maxStale
17-
importcom.apollographql.cache.normalized.normalizedCache
18-
importcom.apollographql.cache.normalized.storeReceivedDate
19-
importdev.johnoreilly.confetti.cache.Cache
15+
importdev.johnoreilly.confetti.cache.Cache.cache
2016
importdev.johnoreilly.confetti.di.getNormalizedCacheFactory
2117
importdev.johnoreilly.confetti.utils.registerApolloDebugServer
2218
importdev.johnoreilly.confetti.utils.unregisterApolloDebugServer
@@ -121,18 +117,11 @@ class ApolloClientCache : KoinComponent {
121117
// }
122118
// )
123119
.addHttpHeader("conference", conference)
124-
.normalizedCache(
120+
.cache(
125121
normalizedCacheFactory,
126122
enableOptimisticUpdates=true,
127123
writeToCacheAsynchronously= writeToCacheAsynchronously,
128-
cacheResolver=CacheControlCacheResolver(
129-
SchemaCoordinatesMaxAgeProvider(
130-
maxAges=Cache.maxAges,
131-
defaultMaxAge=Duration.INFINITE,
132-
)
133-
),
134124
)
135-
.storeReceivedDate(true)
136125
.maxStale(Duration.INFINITE)
137126
.autoPersistedQueries()
138127
.addInterceptor(tokenProviderInterceptor)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp