watch
Gets initial response(s) then observes the cache for any changes.
There is a guarantee that the cache is subscribed before the initial response(s) finish emitting. Any update to the cache done after the initial response(s) are received will be received.
fetchPolicy controls how the result is first queried, while refetchPolicy will control the subsequent fetches.
See also
Observes the cache for the given data. Unlike watch, no initial request is executed on the network. The fetch policy set by fetchPolicy will be used.
fun <D : Query.Data> ApolloCall<D>.watch(fetchThrows: Boolean, refetchThrows: Boolean): Flow<ApolloResponse<D>>
Deprecated (with error)
Exceptions no longer throw
Replace with
watch()
Content copied to clipboard