-
Notifications
You must be signed in to change notification settings - Fork 347
How to pass a variable in a query flow ( from request to response ) #413
Comments
To answer my own question... OK, I finally make it work ( in a very limited way )
fake codes
|
How to pass a variable in a query flow (only i need request ) |
In my codes above, you can pass variables through request to response by .setContext .getContext |
Since this issue is really outdated I am closing it but if you are still concerned about this feel free to reopen and I'll get back to you asap. |
My services structure is 3 layers
browser-> server(RESTful) -> Graphql <-micro services
the RESTful server works like an API proxy with an ApolloClient
so when user post a request, it first post to the RESTful server,
I know I can add headers for each query manually,
but It's not so elegant
so any idea or solution to pass the users' headers or cookies in a middleware?
fake codes
I don't know, for now I haven't searched any posts or docs or apis for this situation,
so feel free to discuss
It's should be a graphql-proxy? or something?
For now, seems the context only applies for direct request from browser to graphql?
The text was updated successfully, but these errors were encountered: