Grafio (v7.15.1) is a high-performance, in-memory graph database for Node.js with native Cypher query support and pluggable storage backends (in-memory built-in, MongoDB via separate package). It supports BFS/DFS traversal, atomic transactions with automatic rollback, DAG validation, topological sort, and Mermaid graph export. Key differentiators: Cypher-native query engine compatible with OpenCypher, smart LRU/LFU/FIFO caching with budget enforcement, and TypeScript-first design. Release cadence: irregular, with active development.
npm install grafioNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Quick start showing in-memory graph creation, Cypher EXECUTE for CREATE and MATCH, and querying relationships.
Use 'import { InMemoryGraphFactory } from 'grafio/storage'' instead of from 'grafio'.Update calls: factory.forGraph(id) instead of factory.createGraph(id).
Use generic result type: Record<string, unknown>[] or assert with Zod.
Replace .query() calls with .execute().
Ensure Node.js version >= 14 (or use bundler that supports exports field). For CommonJS, use 'grafio/storage' with require but ESM is recommended.
Use named import: import { CypherEngine } from 'grafio';Use factory.forGraph(id) (v7+).