
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@jumpn/utils-graphql
Advanced tools
GraphQL utilities
$ npm install --save @jumpn/utils-graphql
$ yarn add @jumpn/utils-graphql
export type {DocumentNode} from "graphql/language/ast";
type GqlErrorLocation = {
line: number,
column: number
};
type GqlError = {
message: string,
locations?: Array<GqlErrorLocation>
};
type GqlRequest<Variables: void | Object = void> = {
operation: string,
variables?: Variables
};
type GqlResponse<Data> = {
data?: Data,
errors?: Array<GqlError>
};
type GqlOperationType = "mutation" | "query" | "subscription";
Transforms an array of GqlError into a string.
Parameters
gqlErrors
Array<GqlError>Examples
const gqlRespose = {
errors: [
{message: "First Error", locations: [{column: 10, line: 2}]},
{message: "Second Error", locations: [{column: 2, line: 4}]}
]
}
const error = errorsToString(gqlRespose.errors);
// string with the following:
// First Error (2:10)
// Second Error (4:2)
Returns string
Returns the type (query, mutation, or subscription) of the given operation
Parameters
operation
stringExamples
const operation = `
subscription userSubscription($userId: ID!) {
user(userId: $userId) {
id
name
}
}
`;
const operationType = getOperationType(operation);
console.log(operationType); // "subscription"
Returns GqlOperationType
Returns true if documentNode has a subscription or false otherwise
Parameters
documentNode
DocumentNodeReturns boolean
MIT :copyright: Jumpn Limited / Mauro Titimoli (mauro@jumpn.com)
FAQs
GraphQL utilities
The npm package @jumpn/utils-graphql receives a total of 31,590 weekly downloads. As such, @jumpn/utils-graphql popularity was classified as popular.
We found that @jumpn/utils-graphql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.