{"library":"apollov4-datasource-mongodb","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"0.1.2","tags":["javascript","apollo","datasource","data source","mongodb","mongo","typescript"],"last_verified":"Fri Jun 05","install":[{"cmd":"npm install apollov4-datasource-mongodb","imports":["import { MongoDataSource } from 'apollov4-datasource-mongodb'","class Users extends MongoDataSource { constructor(options) { super(options); } }","this.findOneById(id, { ttl: 60 })"]},{"cmd":"yarn add apollov4-datasource-mongodb","imports":[]},{"cmd":"pnpm add apollov4-datasource-mongodb","imports":[]}],"homepage":"https://github.com/devileye98/apollov4-datasource-mongodb","github":"https://github.com/devileye98/apollov4-datasource-mongodb","docs":null,"changelog":null,"pypi":null,"npm":"apollov4-datasource-mongodb","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}