I have a bit of a strange use-case, so I don't sup...
# apollo-kotlin
e
I have a bit of a strange use-case, so I don't suppose there's an easy way to do this by the nature of how interceptors work within Apollo. But I am scratching my head to see if it's easy enough to identify the same request from within an
ApolloInterceptor
and a
HttpInterceptor
to then be able to essentially collate all the information Apollo has for that GraphQL call. An
ApolloInterceptor
will supply a UUID for a call, but there's no way to propagate that to an
HttpInterceptor
right?
m
The
ExecutionContext
is passed down to
HttpInterceptor
now IIRC. Let me check
🙏 1
blob ty sign 1
So what you could do is pass the uuid in there.
Create an
ApolloInterceptor
that adds a custom
ExecutionContext
containing the uuid and that will be available in the
HttpInterceptor
very nice 2
Alternatively, you could also use a HTTP header for that. It's a bit weirder but that would work as well. Your
HttpInterceptor
could strip it.
e
Ah I'm thick, I tried the header approach but was under the belief it'd be the HttpInterceptor sending it to the ApolloInterceptor and not the other way around. In hindsight, that doesn't make as much sense
Thanks Martin 🥰
ExecutionContext
looks like exactly what I need
🙌 1
ExecutionContext
worked perfectly. Thanks for the hint 💪
🙌 1