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
With the current ApolloClient.Builder, the order in which interceptors are added is used to build the chain. This can lead to some friction, as certain options automatically add an interceptor (e.g. normalized cache) and certain interceptors actually need to be in a specific order (e.g. NormalizedCache must be before APQ). To account for this, currently we make certain checks in the code, like this, which is not ideal.
Instead we can add dedicated builder methods for specific types of interceptors, and add them in the desired order when calling .build():
With the current
ApolloClient.Builder
, the order in which interceptors are added is used to build the chain. This can lead to some friction, as certain options automatically add an interceptor (e.g. normalized cache) and certain interceptors actually need to be in a specific order (e.g. NormalizedCache must be before APQ). To account for this, currently we make certain checks in the code, like this, which is not ideal.Instead we can add dedicated builder methods for specific types of interceptors, and add them in the desired order when calling
.build()
:setNormalizedCacheInterceptor()
setApqInterceptor()
setRetryInterceptor()
setNetworkInterceptor()
See also #5858.
The text was updated successfully, but these errors were encountered: