
Research
SAP CAP npm Packages Hit by Supply Chain Attack
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.
apollo-mongodb-datasource
Advanced tools
An Apollo GraphQL Datasource using MongoDB.
While there already is a somewhat good MongoDB DataSource package available (apollo-datasource-mongodb), it still lacks some features / functions that we needed in our projects, while it doesn't yet support the main feature of the existing package (Batching), it fixes other small issues like the prevention of spamming MongoDB with requests when there's already a query running for it.
This DataSource is currently in use by PreMiD/API at a large scale.
# NPM
npm i apollo-mongodb-datasource
# YARN
yarn add apollo-mongodb-datasource
index.ts
import { MongoClient } from 'mongodb'
import Users from './dataSources/Users'
const client = new MongoClient('mongodb://localhost:27017/test');
client.connect()
const server = new ApolloServer({
typeDefs,
resolvers,
dataSources: () => ({
users: new Users(client.db().collection('users'))
})
})
Users.ts
import MongoDataSource from 'apollo-mongodb-datasource'
export default class Users extends MongoDataSource {
getUser(userId: string) {
return this.findOne({userId})
}
}
FAQs
An Apollo GraphQL Datasource using MongoDB.
The npm package apollo-mongodb-datasource receives a total of 1 weekly downloads. As such, apollo-mongodb-datasource popularity was classified as not popular.
We found that apollo-mongodb-datasource 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.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.