https://kotlinlang.org logo
Title
n

Nick

11/02/2021, 9:56 PM
Does
watch
also perform a network request if it’s not already in the cache?
apolloClient.watch(BookWithAuthorName()).collect { response ->
      // This will be called every time the book or author changes
  }
m

mbonnin

11/03/2021, 10:28 AM
It depends your initial fetchPolicy
By default it will but you can change it to
CacheOnly
if you don't want a network request
n

Nick

11/03/2021, 1:06 PM
sweet, thanks!
m

mbonnin

11/03/2021, 2:11 PM
Also heads up that this API changes with beta02 (promised it's one of the last breaking changes)
I think this is for the greater good. I quite like the new API but let us know what you think!
n

Nick

11/03/2021, 3:18 PM
I saw! That looks much better.