Replies: 1 comment 8 replies
-
You can pass them from the client like below. As in described in our docs;
Then x-my-token header will be passed to there. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently working on setting up my .meshrc to connect to an external graphql project. Currently, in order to connect to this, my UI pushes around a dozen headers (Authorization: Bearer XYZ, etc.).
This leads to my question - in the 'operationHeaders', even when hardcoding valid headers, I am receiving the following error:
unable to start GraphQL Mesh: invalid json response body at http://localhost/graphql reason: Unexpected 'I'
which is just HTML being returned from the server that says 'Invalid Http Header' - aka, invalid headers passed in my operationHeaders.
However, this works just fine if I hardcode valid headers into schemaHeaders. The problem is, I don't want to hardcode these values! I want to pass them from the client, but it seems GraphQL Mesh won't even start up without them.
Am I using mesh wrong? Can this be used to simply spin up a conduit for the UI to pass authorization? Or does the mesh configuration need to be able to authorize with the external graphql server itself?
Beta Was this translation helpful? Give feedback.
All reactions