I was reading the doc above `CacheAndNetworkInterc...
# apollo-kotlin
s
I was reading the doc above
CacheAndNetworkInterceptor
and I see that it says "An interceptor that emits the response from the cache first, and then emits the response(s) from the network.". And I wonder, when will the
response(s)
actually be plural here? When does the network return more than one response when we're just doing a Query and not a Subscription?
a
@defer will emit multiple times
☝️ 1
s
Aha, of course! I haven't used that feature myself so I forgot about it ☝️ Are there any other possibilities, or just that? For now at least.
👍 1
a
If the normalized cache changes and you are using “watch” method
s
Does watch also go through those same interceptors in order to decide what to do? Doesn't that have a more special flow where it decides what to do? Or does it still hit those interceptors somehow, perhaps when it tries itself to hit the network? But overall I understand that watch returns more than once 😅 I was thinking for a non-watch one, but I guess we covered all the cases by now
a
im not entirely sure what you mean. do you mean network http
interceptors
?
s
No, like the CacheAndNetworkInterceptor which is what I originally started this question with. So Apollo ones, not okhttp
a
Apollo has its own
That’s what I was asking about