Hello, I am having an issue hitting the API with apollo fetch. I keep getting {"message":"Forbidden"} even though I am sending my api key with the fetch. Below is my code. Thank you.
fetch({
method: "POST",
credentials: "include",
headers: {
"content-type": "application/json",
"accept": "application/json",
"x-api-key": process.env.RATE_BEER
},
body: `{
beer(id: 934) {
name
}
}
`,
}).then(res => {
console.log(JSON.stringify(res));
console.log("will this work " + res);
});