"gatsby-source-graphql" threw an error while running the sourceNodes lifecycle: Response not successful: Received status code 400 #32193
Replies: 3 comments 3 replies
-
please make sure to pull changes before running code via the reproduction link |
Beta Was this translation helpful? Give feedback.
-
I have not gotten any help, someone please do something about this. |
Beta Was this translation helpful? Give feedback.
-
Hello @udemezue01, It's a bit hard to understand what is wrong just by the 400 bad response code. You need to understand why your API response is returning 400. You can use Apollo Link to handle errors and |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Preliminary Checks
Description
I installed the latest version of gatsby-source-graphql to connect with a third-party GraphQL API developed by my company and I get 400 errors when trying to connect using the gatsby-source-graphql.
Actually, my company configured the headers differently, they used X-AUTH-TOKEN instead of authorization provided by the gatsby-source-graphql plugin.
For more clarification, here is how I set my gatsby-source-graphql in my source code.
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.
Reproduction Link
https://github.com/udemezue01/KL-Issues
Steps to Reproduce
...
Expected Result
I am supposed to get a 200 OK and be able to query the data of my companies API using the GraphiQL interface.company
Actual Result
Environment
Config Flags
module.exports = {
siteMetadata: {
title: "kl Issues",
},
plugins: [
],
};
Beta Was this translation helpful? Give feedback.
All reactions