Apologies if I missed this somewhere. I’m migratin...
# apollo-kotlin
c
Apologies if I missed this somewhere. I’m migrating from version 2 -> 3.
ApolloSubscriptionCall.Callback
had
onFailure
and
onTerminated
. How are these exposed in Apollo 3.x? Can I
.catch
?
Copy code
subscriptionCall.toFlow()
  .catch { ... }
  .collect { ... }
For that matter is
onConnected
behaviour still exposed?
s
Since it's now a flow, would the flow extensions like
.onStart {}
fit your use case? Also yeah you can definitely use the .catch operator there for anything that may be thrown. I'd guess this should have similar functionality to what old "onFailure" was, but I'd definitely read the docs about what old onFailure was.
c
I haven’t checked recently but I thought onFailure mapped to OkHttp websocket listener’s equivalent callback
Thanks for responding
I haven’t yet used
onStart
, let me take a look