Fork me on GitHub
#graphql
<
2020-03-29
>
husayn04:03:47

Hello …I am using https://github.com/walmartlabs/lacinia-pedestal … I am trying to set cookies/headers as part of a response to a resolver … has anyone done this before ?

oliy07:03:10

You can resolve with context, set it in the context and then use an interceptor to read it from the context and set the headers in the leave phase

husayn13:03:04

@oliy that was what I tried first, but it seems that new context is set only for resolvers below, it is not available on interceptors on its way out

husayn13:03:11

I ended up using with-extensions and set the header on an interceptor’s leave