delegateToSchema not pass context params to remote executor #4692
Unanswered
alitvinenko
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
-
I building gateway service, that proxy (and sometimes modifying) requests to remote subservices.
I want passing some data from main request to subservices requests. For this I pass context to graphqlHTTP.
My guess is that this context should be used in requests called delegateToSchema via a call to RemoteExecutor . But it's not.
I have created a small application with a demonstration of the problem: https://github.com/alitvinenko/delegate_context_example.
Can you please tell me how can I pass the data from the main request to the remote services?
I know that I can set headers field in loadSchema function (https://github.com/alitvinenko/delegate_context_example/blob/main/index.js#L16). But this is not what I need because it is impossible to transfer data from the main requests there.
(and sorry for my english :))
Beta Was this translation helpful? Give feedback.
All reactions