oors-mongodb (v4.29.0) is a module for the oors framework that provides MongoDB integration via Store (thin collection wrapper) and Repository (feature-rich CRUD with validation, relations, and aggregation). It supports seeding, data migration, and built-in GraphQL CRUD akin to Prisma. It uses the official MongoDB Node.js driver (v4+) and is published on npm. Release cadence is tied to the oors monorepo, with monthly patch releases. Differentiators: JSON schema validation, relation-based $lookup joins, and out-of-the-box GraphQL schema generation.
npm install oors-mongodbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MongoDB, defines a Repository with JSON schema, inserts and queries a document.
Use import syntax or ensure your project is configured for ESM.
Import Seeder from 'oors-mongodb/seeder'.
Migrate to the standalone 'oors-graphql-mongodb' package.
Ensure you handle missing _id in your application logic.
Use Repository for validated operations; use Store for raw MongoDB driver access.
Upgrade your MongoDB driver to v4.x.
Use import syntax instead of require. If you must use require, use dynamic import or set NODE_OPTIONS='--experimental-vm-modules'.
Change import to: import { Seeder } from 'oors-mongodb/seeder';Check the MONGO_URI and ensure the user has readWrite on the target database.