Accessing a request's FetchPolicy

Hi All :wave: ,

Please pardon my ignorance.
But I’m curious to know why access to FetchPolicy associated with ApolloRequest is labelled as internal?
I am in the middle of capturing Apollo cache performance data and one of data points that is to be captured is the FetchPolicy associated with the request.
As of now I intend to capture the cache specific data by implementing the ApolloInterceptor while I can access the ApolloRequest inside an implementation of the ApolloInterceptor, I still cannot access the fetchPolicy associated to the request(since the extension function exposing the fetchpolicy of a request is labelled as internal)
Is there anyway I could access the FetchPolicy of an ApolloRequest inside the ApolloInterceptor?

Hi :wave: ! We’re usually conservative in what methods get exposed because every public API added needs to be maintained for a loooong time. Adding is easy but removing is not :sweat_smile:
In this case, looks like there’s a valid use case. Do you mind opening an issue/PR and we’ll look into it?


Thank you for the prompt response.
Link to the issue

1 Like