remote schema subscriptions proxy with authorization #4928
-
I have a schema that proxies some operations to a remote schema. This includes subscriptions. I am upgrading to Every operation that comes through the main service will pass in an authorization token. Even for subscriptions. This token must be proxied through to the remote schema in order for the subscriptions to succeed. I don't see a way to pass through the authorization header to the remote schema.
It would seem I should use
where we had access to the context and could add properties to In the executor I have access to the context but do not see a way to set them into an object that will be passed to the remote schema. Currently I've hacked them into the extensions object but I'm sure that's not appropriate. I'm wondering what is the correct approach for this pattern. In all the relevant examples the token is either static or can be generated with no other context. In my case this client is a proxy and just needs to pass along what is passed in. Would it be more appropriate to have a
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
See this discussion and answer: enisdenjo/graphql-ws#429 |
Beta Was this translation helpful? Give feedback.
See this discussion and answer: enisdenjo/graphql-ws#429