a set of mapping definitions useful across OGIT apps using `hiro-graph-orm`

Usage no npm install needed!

<script type="module">
  import hiroGraphOrmMappings from 'https://cdn.skypack.dev/hiro-graph-orm-mappings';


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.


$ 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]);