
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
graql is a light-weight graphql client depends on nothing but 'node-fetch'.
const {Graql} = require('graql');
const query = `
query MyGraphQuery($id: Int) {
foobar(where: {id: {_eq: $id}}) {
id name description
}
}
`;
const client = new Graql('https://acme.com/graphql');
const result = await client.fetch({query, variables: {id: 1}});
console.log(result.data.foobar);
graql sets two default headers:
content-type: application/jsonaccept: application/jsonYou can add any header as you want without corrupting these default headers.
const client = new Graql(endpoint, {headers: {'x-user-agent': 'myapp'}});
client.fetch({query, variables}, {headers: {'accept': '*/*'}});
The headers set by argument to constructor is not corrupted by the argument to fetch.
If you set debug: true, then it prints out curl command to console.log.
const client = new Graql(endpoint, {debug: true});
FAQs
Light-weight GraphQL client usging node-fetch
We found that graql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.