You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to implement a client-side rate limit in my application using an ApolloInterceptor, and since my client is configured with a normalized cache, the issue I'm running into is that I have no way of telling whether I should limit the request or not, since I don't know if it's going to the network (what I'm trying to limit, to spare the API I'm using), or to the cache. I tried to look through how normalized caching is implemented and found the fetchFromCache extension property.
Describe the solution you'd like
I would like that property to be public (potentially marked with @ApolloInternal?), or another way to tell if the ApolloRequest inside of an interceptor is going to the cache or not. Sorry if I got anything wrong
The text was updated successfully, but these errors were encountered:
Ah, I was under the impression that an interceptor would still be called in this scenario. This works for my use-case so I will close this issue. Thank you!
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.
Use case
I am trying to implement a client-side rate limit in my application using an
ApolloInterceptor
, and since my client is configured with a normalized cache, the issue I'm running into is that I have no way of telling whether I should limit the request or not, since I don't know if it's going to the network (what I'm trying to limit, to spare the API I'm using), or to the cache. I tried to look through how normalized caching is implemented and found thefetchFromCache
extension property.Describe the solution you'd like
I would like that property to be public (potentially marked with
@ApolloInternal
?), or another way to tell if theApolloRequest
inside of an interceptor is going to the cache or not. Sorry if I got anything wrongThe text was updated successfully, but these errors were encountered: