npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@graphium/nestjs

v0.1.0-rc.1

Published

NestJS integration module for Graphium

Readme

@graphium/nestjs

English · 한국어

Graph-native OGM with multiple graph DB backends

Explicit persistence model — no Proxy magic, no N+1 footguns

@graphium/nestjs groups the NestJS entrypoints for the graph-native OGM track and the MikroORM + AGE adapter track.

The root package is a namespace facade. Use the family subpaths directly in application code.

What's new in 0.4

  • Read-only repository inject@InjectRepository(User, { mode: 'read-only' }) returns a ReadOnlyRepository<User>. Calls to persist/remove/flush throw ConfigurationError (Phase 6.1 / 6.2).
  • GraphError-baseclass exception filterGraphQueryErrorFilter uses @Catch(GraphError) and now catches every GraphError subclass (MetadataError, ValidationError, CapabilityError, MigrationError, OptimisticLockError, PartialPersistError).
  • OTel metrics auto wire-upGraphModule.forRoot({ metrics: { provider } }) automatically wires GraphiumMetricsAdapter into the OGM hook chain (Phase 6.6).

Entry Points

| Entry | Role | Status | | ---------------------------- | ------------------------------------ | -------------- | | @graphium/nestjs/ogm | graph-native Nest module and tokens | usable | | @graphium/nestjs/mikro-orm | Mikro adapter Nest module and tokens | experimental |

OGM Quickstart

import { Injectable, Module } from '@nestjs/common'
import { GraphModule, InjectGraphManager } from '@graphium/nestjs/ogm'
import { Neo4jDriver, Node, PrimaryKey, Property } from '@graphium/neo4j'
import type { GraphManager } from '@graphium/neo4j'

@Node({ label: 'User' })
class User {
  @PrimaryKey({ type: 'uuid', generated: true })
  id!: string

  @Property({ type: 'string' })
  email!: string
}

@Injectable()
class UsersService {
  constructor(@InjectGraphManager() private readonly gm: GraphManager) {}

  public list() {
    return this.gm.find(User)
  }
}

@Module({
  imports: [
    GraphModule.forRoot({
      backend: 'neo4j',
      driver: Neo4jDriver.create({
        uri: 'bolt://127.0.0.1:7687',
        username: 'neo4j',
        password: 'password',
      }),
      entities: [User],
      autoRequestContext: true,
    }),
    GraphModule.forFeature([User]),
  ],
  providers: [UsersService],
})
export class AppModule {}

autoDriver auto-discovers only @graphium/neo4j and @graphium/memgraph. For Neptune, pass backend and driver explicitly. The private Cosmos boundary remains opt-in and is not part of auto discovery.

Named Connections

connectionName is part of the public OGM contract.

imports: [
  GraphModule.forRoot({
    backend: 'neo4j',
    driver: primaryDriver,
    entities: [User],
  }),
  GraphModule.forRoot({
    connectionName: 'analytics',
    backend: 'neo4j',
    driver: analyticsDriver,
    entities: [User],
  }),
  GraphModule.forFeature([User]),
  GraphModule.forFeature([User], 'analytics'),
]
constructor(
  @InjectGraphManager() private readonly primary: GraphManager,
  @InjectRepository(User, 'analytics')
  private readonly analyticsUsers: Repository<User>
) {}

Repository, graph, and manager tokens are all scoped by entity + connectionName. Application shutdown closes every registered graph connection automatically.

ORM Quickstart

Use the ORM family modules when the host ORM remains the source of truth.

  • @graphium/nestjs/mikro-orm

Those entrypoints attach the package-owned graph facade and expose it through InjectGraph().

Public Surface

@graphium/nestjs/ogm exports:

  • GraphModule
  • GraphModuleOptions
  • GraphModuleAsyncOptions
  • GraphAutoDriverOptions
  • InjectGraph
  • InjectGraphManager
  • InjectRepository
  • getGraphToken
  • getGraphManagerToken
  • getRepositoryToken

@graphium/nestjs/mikro-orm exports:

  • GraphModule (canonical docs name)
  • GraphMikroModule (explicit alias)
  • GraphMikroOrmModule (deprecated compatibility alias)
  • GraphModuleOptions
  • GraphModuleAsyncOptions
  • InjectGraph
  • getGraphToken

Related Docs