New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@savantly/ngx-graphexp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@savantly/ngx-graphexp

Gremlin client [Tinkerpop] for an Angular app

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

ngx-graphexp

GraphExp plugin for Angular

Installation

yarn -

yarn add @savantly/ngx-graphexp

npm -

npm install @savantly/ngx-graphexp  

Usage

Import the required modules into your application

import { GraphexpModule, GraphexpService } from '@savantly/ngx-graphexp';
import { GremlinClientOptions } from '@savantly/gremlin-js';  

Create an instance of the GraphexpService, passing in a configuration object -

export const graphexpService = new GraphexpService(new GremlinClientOptions());  

Use the component in your application, passing in custom options -

import { GraphConfig, GraphexpService } from '@savantly/ngx-graphexp';
import { Component } from '@angular/core';

@Component({
  selector: 'sv-root',
  template: '<sv-graphexp [graphexpService]="service" [graphConfig]="graphConfig"></sv-graphexp>',
  styleUrls: ['./app.component.css']
})
export class AppComponent {

  graphConfig: GraphConfig = new GraphConfig();

  constructor (public service: GraphexpService) {
    this.graphConfig.nodeLabels = ['god', 'titan', 'demigod', 'human', 'monster', 'location'];
    this.graphConfig.linkLabels = ['is_father_of', 'has_pet', 'lives_in'];
  }

}

Default GraphConfig options

graphConfig.ts

Default GremlinClientOptions

gremlin.client.options.ts

Screenshots

example

menu

Select a label and add properties to the node
create node

shift-drag to create a new connection between nodes
drag link

Select the label and add properties to the link
create link

Keywords

Tinkerpop

FAQs

Package last updated on 11 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts