Skip to content

Object Manager

StatelessGraphObjectManager maps decorated classes to the graph. It writes the statements itself, and gives you a typed DSL for filtering and ordering.

It keeps no state between calls. A load returns what the store holds. What a save writes depends only on the object and the options you pass.

Inject one for each database:

constructor(
@InjectGraphObjectManager() readonly gom: StatelessGraphObjectManager, // the default database
@InjectGraphObjectManager('ANALYTICS') readonly analytics: StatelessGraphObjectManager
) {}

Or take one from GraphObjectManagerFactory, which the module provides: factory.get('ANALYTICS').