Hi everyone, trying to migrate from v3 to v5 of ex...
# graphql-kotlin
k
Hi everyone, trying to migrate from v3 to v5 of expedia-graphql. Having exactly the same issue as in https://github.com/ExpediaGroup/graphql-kotlin/discussions/1095 The problem is we have a flow: in graphql request we create a user and generate JWT token. Then we need to set it into HTTP response header. Currently we do it via http response that we have in graphql context. SO I'm trying to move that logic to Webfilter. But the issue is that in Webfilter the http response is already committed after calling the controllers. So I cannot set the header (https://stackoverflow.com/questions/32829124/adding-header-in-response-in-filter) Any suggestions how to overcome that?
s
You could create a custom GraphQLRequestHandler or a custom GraphQLServer and set the http response object in the context
That way you can access it in your data fetching code and modify it there