@savantly/gremlin-js
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

gremlin-js

Javascript client for a gremlin server

Usage

Script tag -

<script type="text/javascript" src="gremlin.umd.js"></script>

npm/yarn -

npm install @savantly/gremlin-js

Example

var options = new gremlinjs.GremlinClientOptions();
var service = new gremlinjs.GremlinService(options);

var query = service.createQuery('g.V().limit(50).values()');

query.onComplete = function(response) {
	console.log(response);
	$('#results').text(JSON.stringify(response.data));
}

Or custom options -

var service = new gremlinjs.GremlinService({host: 'localhost', port: 8182'});   

Full list of client options [with defaults]-

port = 8182
host = 'localhost'
path = '/gremlin'
language = 'gremlin-groovy'
useSession = true
ssl = false
rejectUnauthorized = true
accept = 'application/json'
processor = ''
channelType = 'websocket'

user: empty;
password: empty;

Readme

Keywords

Package Sidebar

Install

npm i @savantly/gremlin-js

Weekly Downloads

6

Version

1.2.2

License

MIT

Unpacked Size

4.97 MB

Total Files

66

Last publish

Collaborators

  • jdbranham