
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.
just-graphql
Advanced tools
A small extenstion created to handle graphql requests.
justGraphql(
address,
query/mutations payload,
variables/mutations data,
token,
onSuccess callback,
onFailure callback,
HTTP request returning new token in case of error/expiration
)
import justGraphql from 'just-graphql';
var JWT = require('jwt-client');
var jQuery = require("jquery");
justGraphql(`server_address/graphql`,
`query Notifications {
me {
notifications(first: 10, order: "created_at DESC") {
pageInfo {
startCursor,
endCursor,
hasNextPage,
hasPreviousPage
},
totalCount,
edges {
cursor,
node {
id,
type,
data,
read_at,
created_at
}
}
}
}
}`, {
variables: {
//no variables
}
},
`Bearer ${JWT.get()}`,
function(response) {
console.log(response);
},
function(err) {
alert(err);
},
function() {
return (
jQuery.ajax({
url: `server_address/refresh/token`,
type: 'GET',
headers: {
Authorization: 'Bearer ' + JWT.get()
}
})
.then(function (response) {
JWT.forget();
JWT.keep(response.token);
return response.token;
});
)
}
)
.then((data) => {
// pass data back to components state or Redux's store
});
import justGraphql from 'just-graphql';
var JWT = require('jwt-client');
var jQuery = require("jquery");
justGraphql(`server_address/graphql`,
`mutation DeleteRecords($input: DeleteRecordInput!) {
deleteRecord(input: $input) {
user {
records
}
}
}`, {
variables: {
data
}
},
'Bearer ' + JWT.get(),
function(response) {
console.log(response);
},
function(err) {
alert(err)
}
function() {
return (
jQuery.ajax({
url: `server_address/refresh/token`,
type: 'GET',
headers: {
Authorization: 'Bearer ' + JWT.get()
}
})
.then(function (response) {
JWT.forget();
JWT.keep(response.token);
return response.token;
});
)
}
).then((data) => {
// pass data back to components state or Redux's store
});
FAQs
A small extenstion created to handle graphql requests.
The npm package just-graphql receives a total of 5 weekly downloads. As such, just-graphql popularity was classified as not popular.
We found that just-graphql 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.