How to access context value in InterceptOperation created in InterceptField #1791
Unanswered
livictoria
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
I'm experimenting with the graphql extensions. In the
InterceptOperation
hook once operation is completed, I would like to retrieve a value I added in thectx
object fromInterceptField
. i.e.And in InterceptOperation..
But
resCtx.Value(testKey)
returns nil. But in the resolvers, I am able to see testValue fromresCtx.Value(testKey)
. Why is it not possible for the context object in the InterceptOperation response to include the ctx values created in the InterceptField hook?What did you expect?
Minimal graphql.schema and models to reproduce
versions
gqlgen version
v.11.3go version
? 1.16Beta Was this translation helpful? Give feedback.
All reactions