Richard Leggett
10/17/2024, 2:42 PMnull
for some iOS users (Android is fine).
This means there's no `CacheMissException`* when we watch()
our user():Flow
but we can't assert it being there anymore - we are 99% sure the server never returns null
for this value/never cache null
. Any ideas on what we could look into would be very much appreciated.Richard Leggett
10/17/2024, 2:42 PMCacheMissException
to control flow, and now sets the .exception
field of ApolloResponse
- which has an impact on watch()
since it now emits the response, causing dataAssertNoErrors
to fail.bod
10/17/2024, 2:47 PMnull
in the cache, right?Richard Leggett
10/17/2024, 2:48 PMRichard Leggett
10/17/2024, 2:48 PMuser()
/ this row) on launch. Hence thinking it's a migration thing.bod
10/17/2024, 2:50 PMRichard Leggett
10/17/2024, 2:51 PMRichard Leggett
10/17/2024, 2:52 PMnull
value, but if that's the case it would also be populating the .errors
array in GQL... I don't think Apollo used to cache error responses π€bod
10/17/2024, 2:53 PMstorePartialResponses(true)
Richard Leggett
10/17/2024, 2:55 PMNetworkOnly
2. Observing only - CacheOnly
For queries (not mutations)Richard Leggett
10/18/2024, 10:59 AMnull
viewer
and caching it. So I'll keep looking at how we avoid doing that, but any other ideas anyone has please share π πbod
10/18/2024, 11:45 AMRichard Leggett
10/18/2024, 12:31 PMbod
10/18/2024, 12:32 PMRichard Leggett
10/18/2024, 12:38 PM.dataAssertNoErrors
is fine, but .dataAssertNoErrors.viewer
is null.
In v3 .watch()
was not emitting into the Flow until .viewer
was not null
.bod
10/18/2024, 12:41 PMnull
valueRichard Leggett
10/18/2024, 12:42 PMCacheMissException
- the generated GetUserQuery.Data
is there, but the single field it has viewer?
is null.
I wondered if it still considers null
(because viewer
optional) as a successful cached value for viewer
. Hence no cache miss.bod
10/18/2024, 12:44 PMbod
10/18/2024, 12:46 PMRichard Leggett
10/18/2024, 12:46 PMRichard Leggett
10/18/2024, 12:48 PMRichard Leggett
10/18/2024, 12:52 PMstore()
that filters out cache misses.bod
10/18/2024, 12:58 PMApolloStoreInterceptor
- is that the case for yours?Richard Leggett
10/18/2024, 1:01 PMRichard Leggett
10/25/2024, 11:01 AMCacheFirst
appears to "poison the well" by persisting a viewer:null
on iOS only.
β’ GetWoFStatusQuery
fetches viewer { isOptedIntoWoF }
β¦ this is being called with CacheFirst
- a mistake on our side anyway, we should be NetworkOnly
-fetching, and observing via CacheOnly
.
β’ GetUserQuery
fetches viewer { name, etc }
β¦ we observe this as the user():Flow<User>
via CacheOnly
- and assume viewer:null
is never stored, since the API always returns errors[]
if not authorised.
*potentially this is only happening to users that trigger our ReauthenticateInterceptor
(refresh bearer token in-line).