Stylianos Gakis

06/03/2022, 9:03 AM
Got a question about execute() on an ApolloCall. Before, there was one place where we did a simply fire and forget enqueue where I can see in the signature it only throws an exception when the call has already been executed, so we were pretty confident(right?) that one of the two callbacks would be called for sure. Now in 3.x we’ve changed it to execute() and then handle the same cases, but I was wondering, are we guaranteed for either of the two cases to be called now? For starters the coroutine could get cancelled inbetween so in that case I assume we won’t get any response, but even without cancellation, other things could go bad, like a parsing exception or whatever, and it would still not reach the
block right? In general I was thinking about this and I realize I can’t answer this question with much confidence, so I thought I’d ask here 😄


06/03/2022, 9:29 AM
can throw - that will be the case for network errors, so a fairly common one!
is specifically for GraphQL backend level errors.
in that case indeed the
here won't be called 🙂 There's also
which can help handle all error cases in the same catch block
(Not sure if you've seen this doc but it explains this in more details)

Stylianos Gakis

06/03/2022, 9:54 AM
Amazing, thanks for the response and the docs link! I’ve definitely seen this before but I forget things 😄
👍 1
😅 1