Is there a way to pass headers for Subscription? #6289
-
|
Hi there, I am using mesh + yoga. And forwarding headers to yoga and back via the plugin described here #4967. And how I have a need to add headers, or somehow pass context from mesh to yoga in one direction only. It's not about forwarding the header from a client, mesh gets the user in AuthPlugin and I want to pass the header or whatever with "currentUser" yoga, but wasn't able to find a way to do that. Hope for your help |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
It depends on which transport you use. If you use SSE, |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for such quick response. Yes, I use WS, I tried to set |
Beta Was this translation helpful? Give feedback.

The actual problem here is much more complicated. The WebSocket instance in Mesh is instantiated during initialisation providing the
connectionParams, and then that client instance is used during execution.If this weren't so, each subscription would create a new WebSocket connection itself - which is not ideal.
Issue to track: #6335.