MongoDB storage backend for grafio, a graph database with a pluggable storage architecture. Current stable version is 3.15.1. Requires MongoDB >= 5.0.0 and grafio runtime. Ships TypeScript types. Release cadence is not specified; updates follow grafio core. Key differentiator: provides persistent graph storage with native MongoDB transactions, optimized indexes for nodes/edges, and multi-graph partitioning via graphId.
npm install grafio-mongoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a MongoDB-backed graph factory, ensures indexes, and performs basic node/edge operations.
Update mongodb driver to version 5 or later: npm install mongodb@5
Use async/await or .then() for all operations; remove callback parameters.
Remove `useTransactions` option from MongoGraphFactory constructor.
Convert ObjectId to string with `.toString()` before passing as nodeId.
Install both: npm install grafio mongodb
Replace `graphId:` with `graphName:` in configuration.
Install required peers: npm install grafio mongodb
Ensure factory is created: const factory = new MongoGraphFactory(db); then await factory.ensureIndexes();
Use graph.updateNode() to modify existing nodes, or ensure unique ids per graph.
Update to grafio-mongo@3 and use addEdge, or check version's API docs.
Convert ObjectId to string: nodeId.toString()