Apollo MongoDB Data Source (fork v4)

JSON →
library 0.1.2 ·javascript
verified Jun 5, 2026

A data source for Apollo Server v4 that integrates MongoDB via native driver collections or Mongoose models. Version 0.1.2 (stable) provides DataLoader-based batching and per-request memoization caching, with optional shared application-level caching (ttl). Key differentiators: supports both native MongoDB driver and Mongoose, provides caching for findOneById, findManyByIds, and findByFields methods, and includes a deleteFromCacheById utility. This is a fork of the original apollo-datasource-mongodb adapted for Apollo Server v4. Peer dependency on mongoose (*) required if using Mongoose models. Ships TypeScript types. Release cadence: low.