Registry / database / gremlin-orm-connected

gremlin-orm-connected

JSON →
library1.2.5jsnpmunverified

An ORM for graph databases (Neo4j, Azure Cosmos DB) on Node.js using Gremlin. Provides model definitions with type constraints, query building, and CRUD operations for vertices and edges. Version 1.2.5 wraps gremlin-javascript client. Low maintenance; last release November 2022. Differentiators: simple schema-based ORM layer over raw Gremlin, supports multiple graph backends.

npm install gremlin-orm-connected
INSTALL
IMPORT
SIG · GREMLIN-ORM-CONNEC
G
gremlin-orm-connected
databasejavascriptv1.2.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const gremlinOrm = require('gremlin-orm');
import gremlinOrm from 'gremlin-orm';
Package does not support ESM imports; use CommonJS require. Only default export available.
def
const Person = g.define('person', { ... });
Define model via instance method after constructing gremlinOrm instance.
queryRaw
const result = await g.queryRaw('g.V().limit(10)');
Use async/await or callbacks; queryRaw returns raw Gremlin response.

Connects to Neo4j Gremlin server, defines a Person model, creates a vertex, then retrieves all vertices.

const gremlinOrm = require('gremlin-orm'); const g = new gremlinOrm('neo4j', process.env.GPORT ?? '8182', process.env.GHOST ?? 'localhost', { ssl: false }); const Person = g.define('person', { name: { type: g.STRING, required: true }, age: { type: g.NUMBER } }); Person.create({ name: 'Alice', age: 30 }, (err, result) => { if (err) console.error(err); else console.log('Created:', result); }); Person.findAll({}, (err, results) => { if (err) console.error(err); else console.log('All persons:', results); });
Debug
Known issues
deprecatedPackage last updated in November 2022; no activity since. May lack security patches and modern Gremlin server compatibility.
fix
Consider alternative libraries like gremlin-javascript directly, or evaluate usage with current database versions.
affects: >=1.0.0
gotchaESM imports not supported; using `import` from this package will fail. Must use CommonJS `require`.
fix
Use `const gremlinOrm = require('gremlin-orm');` in a CommonJS context.
affects: all
gotchaThe `dialect` argument for Azure Cosmos DB requires an array with partition name, e.g., `['azure', 'partitionName']`. Omitting will cause connection errors.
fix
Pass correct dialect: `new gremlinOrm(['azure', 'myPartition'], ...)`.
affects: all
breakingServer compatibility: Requires Gremlin Server supporting `gremlin-groovy` script engine. Some high-end server versions dropped scripting; this ORM will not work.
fix
Use gremlin-javascript client directly with bytecode queries or use legacy Gremlin Server.
affects: >=3.5.0 (server)
Errors
Common errors & fixes
Cannot find module 'gremlin-orm'
Package not installed or name misspelled (note hyphen vs underscore).
fix
Run `npm install gremlin-orm` and use `require('gremlin-orm')` (not 'gremlin_orm').
TypeError: gremlinOrm is not a constructor
Trying to use ES6 `import` on a CommonJS-only module without default interop.
fix
Use `const gremlinOrm = require('gremlin-orm');` and then `new gremlinOrm(...)`.
Read ECONNRESET
TLS/connection issue: SSL enabled but certificate rejected, or wrong host/port.
fix
Ensure Gremlin Server is running. For local dev without SSL, set `{ ssl: false }`. For Azure, configure proper endpoint and credentials.
Upgrade
Version history
1.2.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
gremlin-orm-connected — npm install gremlin-orm-connected · libregistry