Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@midgar/apollo-server
Advanced tools
Système de services avec injection de dépendance pour Midgar
$ 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/.
Un fichier graphql contient les typeDefs et les resolvers graphql. exemple d'un fichier graphl:
const { gql } = require('apollo-server-express')
const typeDefs = gql`
type User {
id: ID!
email: String!
}
extend type Query {
addUser(email: String): User
getUsers: [User]
}
`
const typeDefs = (mid) => {
const users = []
return {
User: {
...
}
Query: {
getUsers: (parent, args, ctx, info) => {
...
},
addUser: async (parent, args, ctx, info) => {
...
}
}
}
}
export default {
typeDefs,
resolvers
}
Vous pouvez séparrer le fichier si besoin:
import typeDefs from './user.typedefs'
import resolvers from './user.resolvers'
export default {
typeDefs,
resolvers
}
Les fichiers *.typedefs.js et *.resolvers.js ne sont pas importé lors de l'import des fichiers graphql.
FAQs
A Midgar plugin to add graphql server
The npm package @midgar/apollo-server receives a total of 0 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.