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.
apollo-modulizer
Advanced tools
Modularizing your Apollo GraphQL schema code
yarn add apollo-modulizer
npm install --save apollo-modulizer
You can get the full example here: https://github.com/Maxvien/apollo-modulizer/tree/master/example
const { gql } = require('apollo-server');
const { createModule } = require('apollo-modulizer');
const typeDef = gql`
type User {
id: ID!
name: String
posts: [Post]
}
input UserInput {
name: String
}
`;
const resolvers = {
User: {
posts: () => [
{ id: 1, title: 'Apollo Server', content: 'Hello Apollo Server!' },
],
},
};
module.exports = createModule({ typeDef, resolvers });
const { allModules } = require('apollo-modulizer');
const User = require('./user.module');
const Post = require('./post.module');
const Query = require('./query.module');
module.exports = { typeDefs, resolvers } = mergeModules([User, Post, Query]);
const { ApolloServer } = require('apollo-server');
const { typeDefs, resolvers } = require('./modules');
const server = new ApolloServer({ typeDefs, resolvers });
server.listen().then(({ url }) => {
console.log(`🚀 Server ready at ${url}`);
});
FAQs
Modularizing your Apollo GraphQL schema code
The npm package apollo-modulizer receives a total of 0 weekly downloads. As such, apollo-modulizer popularity was classified as not popular.
We found that apollo-modulizer 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.