https://kotlinlang.org logo
Title
d

Doug Chappelle

07/27/2021, 3:45 PM
Something changed between v3.0.0-dev14 and v3.0.0-alpha01 that is now causing one of my mutations to never return. I'm looking into it more but thought I would post this in case it rings a bell with anybody involved in making those changes.
m

mbonnin

07/27/2021, 3:46 PM
Is this on JVM or Apple ?
d

Doug Chappelle

07/27/2021, 3:47 PM
Android, so I would assume JVM
m

mbonnin

07/27/2021, 3:48 PM
Yup, Android is JVM
Is this using a WebSocketNetworkTransport? or regular HttpNetworkTransport?
d

Doug Chappelle

07/27/2021, 3:49 PM
WebSocketNetworkTransport
👍 1
m

mbonnin

07/27/2021, 3:49 PM
Alright. Yep, there have been a few changes around this
Mmm no that mainly touches AppSync
d

Doug Chappelle

07/28/2021, 6:40 PM
m

mbonnin

07/28/2021, 6:57 PM
Oh wow that's interesting.... I wouldn't expect this to do anything with mutations.
I'm afk right now but will dig a bit more later today
d

Doug Chappelle

07/28/2021, 7:00 PM
np, thx
m

mbonnin

07/28/2021, 9:53 PM
This PR is relatively small. The only thing that could maybe explain a behaviour change is the change from
flatMapLatest
to
flatMapConcat
(here).
d

Doug Chappelle

07/28/2021, 9:56 PM
When I get a chance I'll try changing it back and see what happens... get some sleep
:thank-you: 1
m

mbonnin

07/28/2021, 9:56 PM
Thanks!
IIRC, this was made so that emissions from the ApolloCacheInterceptor would not suspend (so that we can check the cache status just after receiving the response, else receiving the response is always delayed to after potentially writing the cache)
So this changes the supension points.
flatMapLatest
is introducing an intermediate channel that maybe prevents a deadlock or something like this
Going to sleep too, have a good night!
👍 1