Skip to content

Latest commit

 

History

History
 
 

hiro-graph-orm-mappings

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

hiro-graph-orm-mappings: Common mappings for hiro-graph-orm

Common OGIT entity type and relation mappings for hiro-graph-orm

See hiro-graph-orm for details on how the schema works and what it is useful for.

installation

$ npm install hiro-graph-orm-mappings

Then they can be imported individually or in a block.

As a block:

import { Schema } from "hiro-graph-orm";

import mappings from "hiro-graph-orm-mappings";

const schema = new Schema(mappings);

Or individually:

import { Schema } from "hiro-graph-orm";

//this would include everything in a bundle, not so good for frontend
import { Person, Org } from "hiro-graph-orm-mappings";
//or better for frontend
import Person from "hiro-graph-orm-mappings/lib/person";
import Org from "hiro-graph-orm-mappings/lib/org";

const schema = new Schema([Person, Org]);