I'm not sure how I didn't notice this before but w...
# confetti
j
I'm not sure how I didn't notice this before but when I switch to different conferences in the Web client (e.g. https://wasm.confetti-app.dev/) it changes theme color for some reason but sessions don't change.....will dig a bit and see if I can see why
Copy code
setConference, conference = androidmakers2024
SessionsUiState.Success, conference = KotlinConf 2024
Some state issue...
I think this is pretty much same code as used in Compose for Desktop client....not sure why it would behave differently here
hmm, think it's related to change I made in
ApolloClientCache
here locally where I'm only using in memory cache (as we don't have
sqlNormalizedCacheFactory
etc on web
ah, with just
MemoryCacheFactory
we have nothing to associate with particular conference!
@mbonnin is there way as a test that I can at least clear in memory cache?
(when switching conferences)
m
You can clear the cache with
apolloClient.apolloStore.clear()
I don't see how that would change the behaviour vs Sql though
j
yeah, maybe not....I'm not fully clear yet what's happening in this case with just in memory cache
our UI is driven primarily from cache I believe.....and when we switch conference we should get new client object along with new cache presumably
strange, commenting out
.autoPersistedQueries()
seems to "fix" the issue
m
Ah, that might be a CDN thing, I though I put "conference" in the cache key there though 🤔
j
this does seem to be specific to the web client for some reason
m
Because APQs use GET, they hit the CDN which is usually good
sounds like local browser cache
j
compose desktop app for example works fine (just using in memory cache as well in this case)
m
You'll probably want to pass
conference
as a query param
(the backend doesn't support that but that will force it into the browser cache key)
serverUrl("<https://confetti-app.dev/graphql?conference=androidmakers2024>)
And hope that the query param passes through
I should probably add a
Vary
header too (doc)
j
yeah, looks like that works
m
Sorry, I'm a bit new to those browser considerations
I added a Vary header there as well. I think it's better to add it: https://github.com/joreilly/Confetti/pull/1298
j
so that's an alternative to putting as query param?
m
I hope so
j
nice
is that deployed already? seems to be working now
m
j
can get rid of all my println's now 🙂
the joy of debugging using browser console
m
println never disappoints 😄