Neal Sanche
05/06/2021, 5:32 PMrocketraman
05/10/2021, 3:58 PMFilip Wiesner
05/10/2021, 7:40 PMwasyl
05/12/2021, 8:11 AMPERSISTED_QUERY_NOT_FOUND
error? Just something for logging purposesRupesh
05/27/2021, 4:20 AMjames
05/27/2021, 6:45 AMNeal Sanche
06/01/2021, 5:48 PMwasyl
06/02/2021, 12:13 PMFoo(a, b)
and it will make network request that finishes after ~500ms. ~200ms from the first query I make second, same Foo(a, b)
query, so the first one is still running.
Would it make sense for Apollo to merge the same requests internally, and if a network request is already running — just attach the new observer to the existing one and share the result? Similarly, everything related to observing the cache could be shared as well.
This is something that could be done on the app side, but seems like a useful optimisation that could be part of Apollo. Any thoughts on this?maxgdn
06/07/2021, 9:25 PMresponse.errors
will the resulting response (query) be cached? Any good reading material or resources on this topic?wasyl
06/08/2021, 4:57 PMprefetch
if we’re already observing the query we want to prefetch? Will we avoid some parsing, for example?
Context: we’re trying to have a separation between observing data from cache and refreshing it. Observers will do:
val observer = apolloClient.query(operation).toBuilder()
.responseFetcher(ApolloResponseFetchers.CACHE_ONLY)
.build()
.toFlow()
and I wonder if there’s preferred refreshing method. One is prefetch:
fun refresh() = apolloClient.prefetch(operation).await()
another is a NETWORK_ONLY
request and awaiting first response:
fun refresh() = apolloClient.query(operation).toBuilder()
.responseFetcher(ApolloResponseFetchers.NETWORK_ONLY)
.build()
.toFlow()
.first()
I also see ApolloQueryWatcher#refetch
, but I don’t think it’ll work for us because it doesn’t propagate errors.
Prefetch
has some optimisations mentioned in the docs, are they relevant if we have another query observing the cache?rocketraman
06/28/2021, 8:26 PM__UNKNOWN
elements for enums? They are annoying because they basically break exhaustive whens. I'd rather have the compiler tell me a new enum was added and it needs to be handled rather than dealing with __UNKNOWN
explicitly everywhere.Pitel
07/02/2021, 8:48 AMtonnyl
07/03/2021, 1:31 PMAndré Thiele
07/05/2021, 4:41 PMCaused by: java.io.IOException: Error while analyzing DeleteVisitsByUuidMutation$Data.class.
I am using Jacoco 0.8.7 and Apollo 2.5.9Napa Ram
07/07/2021, 10:10 AMmbonnin
07/12/2021, 8:14 PM3.0.0-alpha01
is available on Maven Central! That's a pretty significant release that unifies apollo-runtime
and apollo-runtime-kotlin
(and most importantly will make the Github bar 100% #A97BFF !!). It should make it way easier to work with multiplatform code, including caching. It also makes reading the SQL cache wayyyyyyyyyy faster, has a new codegen mode that generates fragments as interfaces, @nonnull
directives and more...
Full details:
• Changelog: https://github.com/apollographql/apollo-android/releases/tag/v3.0.0-alpha01
• Migration guide: https://www.apollographql.com/docs/android/v3/migration/3.0/
Obviously it's still alpha so please report any weird behaviour or things you'd like to change, feedback is very welcome!vio
07/18/2021, 1:37 PMsessions
to allow authentication with cookies, but I'm not sure how to configure the apollo client to allow cookies. Any suggestions are helpful, thank you! 🙏🏻
My code looks like this:
val url = "....
val okHttp = OkHttpClient
.Builder()
.build()
val apolloClient = ApolloClient
.builder()
.serverUrl(url)
.okHttpClient(okHttp)
.build()
Anders Oedlund
07/20/2021, 9:49 PMapollo {
service("foo") {
generateAsInternal.set(true)
schemaFile.set(file("src/commonMain/graphql/com/example/shared/graphql/schema.graphqls"))
registry {
graph.set("example-123")
graphVariant.set("variant")
key.set(".....")
}
}
}
and then just run ./gradlew downloadApolloSchema
but I’m being met with the following error
* What went wrong:
Execution failed for task ':shared:downloadApolloSchema'.
> ApolloGraphQL: no schema property
I assume I’m missing something simple?Nick
07/23/2021, 5:23 PMDoug Chappelle
07/27/2021, 3:45 PMrocketraman
08/02/2021, 3:39 PMDoug Chappelle
08/11/2021, 7:04 PMTower Guidev2
08/24/2021, 11:53 AMApollo3
on Androidrocketraman
08/24/2021, 3:07 PMNick
08/24/2021, 9:36 PMsealed class
for the response? I’d like to emit various states such as loading
, failure
, and success
but I don’t want to have to implement this on every call, I’d rather just do it in one spot 😄Tower Guidev2
08/25/2021, 12:44 PMvio
08/25/2021, 5:45 PMapollo3
, unfortunatelly I can't manage to configure it such that the mutations/queries are not generated at each run.
I've set this: generateKotlinModels.set(false)
, but seems to have no effect. Not sure if there's anything else I could do, is there a way to disable generating everything at each run? 🙏Nick
08/31/2021, 3:46 PMjava.lang.NoSuchFieldError: No static field ISO8601DATETIME of type Lcom/xxx/android/type/CustomType; in class Lcom/xxx/android/type/CustomType; or its superclasses (declaration of 'com.xxx.android.type.CustomType' appears in /data/data/com.xxx.android/code_cache/.overlay/base.apk/classes18.dex)
Do you think it’s related to this? https://github.com/apollographql/apollo-android/issues/2043Nick
08/31/2021, 3:50 PMNick
09/08/2021, 2:49 PMNick
09/08/2021, 2:49 PMmbonnin
09/08/2021, 2:50 PMNick
09/08/2021, 2:55 PM