wasyl
05/12/2021, 8:11 AMPERSISTED_QUERY_NOT_FOUND
error? Just something for logging purposeswasyl
05/12/2021, 8:28 AMsetAutoPersistedOperationsInterceptorFactory
will help, but it seems like setting it overwrites the one set by enableAutoPersistedQueries(true)
.
I suppose I could create my own interceptor that wraps ApolloAutoPersistedOperationInterceptor
?wasyl
05/12/2021, 8:38 AMmbonnin
05/12/2021, 8:42 AMPERSISTED_QUERY_NOT_FOUND
mbonnin
05/12/2021, 8:42 AMwasyl
05/12/2021, 8:46 AMmbonnin
05/12/2021, 8:47 AMApolloAutoPersistedOperationInterceptor
and ApolloParseInterceptor
🤔wasyl
05/12/2021, 8:49 AMset..factory
overwrite enable…
option, I thought it was some additional factory exactly to provide some additional listeners or in any way hook into apq flowmbonnin
05/12/2021, 8:50 AMmbonnin
05/12/2021, 8:51 AMmbonnin
05/12/2021, 8:53 AMsetInterceptorFactories
route there instead but with all this code being ultimately moved to Kotlin, I'm not thrilled at the idea at changing thiswasyl
05/12/2021, 8:57 AMwasyl
05/12/2021, 8:58 AMwasyl
05/12/2021, 8:59 AMFactory(boolean useHttpGet, boolean persistQueries, boolean persistMutations, SomeCallback listener)
constructor and let me create the factory manually, providing custom listener, instead of using enableApq(true)
. This seems kind of like a band-aid api thoughmbonnin
05/12/2021, 9:03 AMApolloAutoPersistedOperationInterceptor.java
? Maybe even copy/paste it in Kotlin, that'll be even less lines 😅mbonnin
05/12/2021, 9:03 AMmbonnin
05/12/2021, 9:05 AMwasyl
05/12/2021, 9:07 AMmbonnin
05/12/2021, 9:09 AMwasyl
05/12/2021, 12:36 PMlogger
and passing an adapter that logs to our infrastructure 🙂 The built-in implementations logs exactly what I want anyway
internal class ApqInterceptorFactory : ApolloInterceptorFactory {
private val wrapped = ApolloAutoPersistedOperationInterceptor.Factory(false, true, true)
private val loggerAdapter = ApolloLogger(ApolloLoggerToLogAdapter())
override fun newInterceptor(logger: ApolloLogger, operation: Operation<*, *, *>) =
wrapped.newInterceptor(loggerAdapter, operation)
}
wasyl
05/12/2021, 12:37 PM