Jaime
04/26/2022, 2:10 AMApolloClient.Builder()
.serverUrl(BuildConfig.HOST)
.okHttpClient(okHttpClient.build())
.autoPersistedQueries(
httpMethodForHashedQueries = HttpMethod.Get,
httpMethodForDocumentQueries = HttpMethod.Get,
)
.normalizedCache(cacheFactory)
.addInterceptor(SessionInterceptor(context))
.addInterceptor(LanguageInterceptor())
.build()
Query
val queryResult = query(query).fetchPolicy(CacheFirst).execute()
Methods normalizedCache and fetchPolicy not found in 3.2.1mbonnin
04/26/2022, 7:50 AMapollo-normalized-cache
to your dependenciesJaime
04/26/2022, 2:12 PMconst val graphQLRuntime =
"com.apollographql.apollo3:apollo-runtime:${Versions.graphQL}"
const val graphQLApi =
"com.apollographql.apollo3:apollo-api:${Versions.graphQL}"
const val memoryCache =
"com.apollographql.apollo3:apollo-normalized-cache-sqlite:${Versions.graphQL}"
Versions.graphQL = 3.2.1
Stylianos Gakis
04/26/2022, 2:25 PMconst val graphQLRuntime = "com.apollographql.apollo3:apollo-runtime:${Versions.graphQL}"
const val graphQLApi = "com.apollographql.apollo3:apollo-api:${Versions.graphQL}"
const val normalizedCacheSqlite = "com.apollographql.apollo3:apollo-normalized-cache-sqlite:${Versions.graphQL}"
const val normalizedCache = "com.apollographql.apollo3:apollo-normalized-cache:${Versions.graphQL}"
and see if your IDE is happy after syncing gradle.Jaime
04/26/2022, 8:58 PM