-
-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
I've got this to work using Postman, however the following code generates a JSON parse error?
Code
const graphql = require('graphql.js');
const graph = graphql('https://api.github.com/graphql', {
method: "POST",
headers: {
"User-Agent": "node",
"Authorization": "Bearer <github-token>"
}
});
const query = graph(`query { viewer { login name } }`);
query().then(
res => console.log(JSON.stringify(res)),
err => console.error(err)
);Error
{ message: 'Problems parsing JSON',
documentation_url: 'https://developer.github.com/v4' }Metadata
Metadata
Assignees
Labels
No labels