intercept

abstract fun <D : Operation.Data> intercept(request: ApolloRequest<D>, chain: ApolloInterceptorChain): Flow<ApolloResponse<D>>

Intercepts the given request. Call chain.proceed() to continue with the next interceptor or emit items directly to bypass the chain.

Exceptions thrown from intercept are not caught and are propagated to the call site. Use ApolloResponse.Builder.exception() to return an exception response if you don't want your com.apollographql.apollo.ApolloCall to throw.

See also