Code Monkey home page Code Monkey logo

erm's Introduction

ERM

ERM : Entity Relationship Manager

Graph-based data model to manage entities (nodes) and their relationships (edges) with the following features:

  • Support for different storage providers (e.g. elasticsearch)
  • RESTful & GraphQL APIs
  • Strongly typed field definitions and localizable property values.

Setup

  1. Run elasticsearch locally (using http://localhost:9200) or change Vouzamo.ERM.Api > Startup.js for alternative options / providers.
  2. Build & run the Vouzamo.ERM.Api project.
  3. Use GraphiQL (/graphiql) to interact with GraphQL.

Getting Started

Lets use an example to explain how to produce a data model:

alt text

Creating the NodeType(s)

Using GraphiQL, run the following mutation:

mutation CreateNodeTypes {
  types {
    human: create(name: "Human", scope: NODES) {
      id
    }
    dog: create(name: "Dog", scope: NODES) {
      id
    }
    cat: create(name: "Cat", scope: NODES) {
      id
    }
  }
}

This will return the id for each created type which you can use in the following mutations to add fields:

mutation AddHumanFields($givenName: FieldInput!, $middleNames: FieldInput!, $familyName: FieldInput!, $description: FieldInput!) {
  types {
    givenName: addField(id: "{id}", field: $givenName)
    middleNames: addField(id: "{id}", field: $middleNames)
    familyName: addField(id: "{id}", field: $familyName)
    description: addField(id: "{id}", field: $description)
  }
}

//variables
{
  "givenName": {
    "type": "string",
    "key": "givenName",
    "name": "Given Name",
    "mandatory": true,
    "enumerable": false,
    "localizable": false
  },
  "middleNames": {
    "type": "string",
    "key": "middleNames",
    "name": "Middle Names",
    "mandatory": false,
    "enumerable": true,
    "localizable": false
  },
  "familyName": {
    "type": "string",
    "key": "familyName",
    "name": "Family Name",
    "mandatory": true,
    "enumerable": false,
    "localizable": false
  },
  "description": {
    "type": "string",
    "key": "description",
    "name": "Description",
    "mandatory": false,
    "enumerable": false,
    "localizable": true
  }
}

Note: Remember to replace {id} with the value returned by the previous mutation for the Human type.

erm's People

Contributors

vouzamo avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar germanpa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.