I tried making graphQL request resources with the following credentials and I got these errors below.
Here are some of the details of the GraphQL info below.
The GraphQL Endpoint is set up:
https://kaleidoscope-graph-ql.herokuapp.com/graphql
Required header "
X-AUTH-HEADER ="7ed06945712f04eecb3f1bcfbf4baee0cf55870b"
I don't know how to set it up in such a way that it returns a 200 ok
{
resolve: "gatsby-source-graphql",
options: {
typeName: "KL",
fieldName: "KL",
url: "https://kaleidoscope-graph-ql.herokuapp.com/graphql",
// HTTP headers
headers: {
// Learn about environment variables: https://gatsby.dev/env-vars
"Content-Type":"application/json",
"X-AUTH-TOKEN": `7ed06945712f04eecb3f1bcfbf4baee0cf55870b`,
},
}
},
I am supposed to get a 200 OK and be able to query the data of my company API using the GraphiQL interface. company
My question is that, how can I customize the headers in such a way that it accepts X-AUTH-TOKEN instead of the authorization provided by the gatsby-source-graphql plugin.
"gatsby-source-graphql" threw an error while running the source nodes lifecycle:
Response not successful: Received status code 400
ServerError: Response not successful: Received status code 400
- index.ts:114 Object.exports.throwServerError
[raganortho]/[apollo-link-http-common]/src/index.ts:114:17
- index.ts:145
[raganortho]/[apollo-link-http-common]/src/index.ts:145:11
- task_queues.js:95 processTicksAndRejections
internal/process/task_queues.js:95:5
Reproduction Link.
https://github.com/udemezue01/KL-Issues
Steps to Reproduce
- clone project
- cd KL-issues
- npm install.
- gatsby develop
Expected Result
I expected to get a 200 OK response