The docs show this snippet for setting Fetch Policy
// Replace
val response = apolloClient.query(query)
.toBuilder()
.responseFetcher(ApolloResponseFetchers.CACHE_FIRST)
.build()
.await()
// With
val request = ApolloRequest(query).withFetchPolicy(CacheFirst)
val response = apolloClient.query(request)
However when I try this code snippet in Android Studio there is no function called withFetchPolicy()
my gradle resembles this
api 'com.apollographql.apollo3:apollo-runtime:3.0.0-alpha03'
api 'com.apollographql.apollo3:apollo-api:3.0.0-alpha03'
with plugin this
plugins {
id "com.android.library"
id "kotlin-android"
id "kotlin-kapt"
id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.20'
id 'dagger.hilt.android.plugin'
id 'com.apollographql.apollo3' version '3.0.0-alpha03'
}
where have I gone wrong?