-
I have multiple GraphQL servers which require token authentification. Unfortunately, graphql-mesh seems to drop any headers sent from the client. Is it possible to forward any given authentication tokens (or headers in general) to the different GQL servers? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Actually GraphQL Mesh doesn't drop the headers because it is not a server :) It is a library that generates a GraphQL Schema for you and If you stick with sources:
- name: SomeEndpoint
handler:
graphql:
endpoint: ....
operationHeaders:
Authorization: "{context.headers.Authorization}" or you can pass it using arguments; sources:
- name: SomeEndpoint
handler:
graphql:
endpoint: ....
operationHeaders:
Authorization: Bearer {args.someApiKey} |
Beta Was this translation helpful? Give feedback.
-
When using: Therefore, I guess the real question is: |
Beta Was this translation helpful? Give feedback.
-
Same here seems that the interpolation does not work in the headers field of an graphql endpoint |
Beta Was this translation helpful? Give feedback.
Same here seems that the interpolation does not work in the headers field of an graphql endpoint
with an openapi endpoint this works perfect