
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.
@midgar/apollo-server
Advanced tools
PLugin Midgar pour ajouter un service Apollo serveur avec loader de modules graphql et injéction de services.
$ npm i @midgar/apollo-server --save
Si tout s'est bien passé, un message de confirmation s'affiche:
#midgar-cli
@midgar/apollo-server added to plugins.js !
Ajoute un dossier de plugin midgar-graphql: ./graphql/ pour les modules graphl.
Un module graphql est un fichier javacript exportant les typeDefs et les resolvers graphql.
Exemple d'un module graphl:
import { gql } from 'apollo-server-express'
// Type defs graphql
const typeDefs = gql`
type User {
id: ID!
email: String!
}
extend type Query {
addUser(email: String): User
getUsers: [User]
}
`
export default {
// Services à incjecter
dependencies: ['mid:user']
graphql: (mid, userService) => {
return {
typeDefs,
resolvers:{
User: {
...
}
Query: {
createUser: async (parent, args, ctx, info) => {
await userService.create(args.email, args.parssword)
},
getUsers: (parent, args, ctx, info) => {
...
},
}
}
}
}
}
Vous pouvez séparrer le fichier si besoin:
import typeDefs from './user.typedefs'
import resolvers from './user.resolvers'
export default {
dependencies: ['mid:user']
graphql: (...args) => {
return {
typeDefs,
resolvers: () => resolvers(...args)
}
}
}
Les fichiers *.typedefs.js et *.resolvers.js ne sont pas importé lors de l'import des modules graphql.
FAQs
A Midgar plugin to add graphql server
The npm package @midgar/apollo-server receives a total of 2 weekly downloads. As such, @midgar/apollo-server popularity was classified as not popular.
We found that @midgar/apollo-server 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
/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.