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

node-redisgraph

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-redisgraph

Connect to RedisGraph 1.0.0 and up from JavaScript

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

npm version

redisgraph.js

RedisGraph JavaScript Client

Installation

Installation is done using the npm install command:

npm install redisgraph.js

Overview

Official Releases

Example: Using the JavaScript Client

let graph = new RedisGraph('social');
graph
.query("CREATE (:person{name:'roi',age:32})")
.then( () => {
	return graph.query("CREATE (:person{name:'amit',age:30})");
})
.then( () => {
	return graph.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[knows]->(a)")
})
.then( () => {
	return graph.query("MATCH (a:person)-[knows]->(:person) RETURN a")
})
.then( (res) => {
	while(res.hasNext()){
		let record = res.next();
		console.log(record.getString('a.name'));
	}
	console.log(res.getStatistics().queryExecutionTime());
});

Running tests

A simple test suite is provided, and can be run with:

$ mocha

The tests expect a Redis server with the RedisGraph module loaded to be available at localhost:6379

License

redisgraph.js is distributed under the BSD3 license - see LICENSE

FAQs

Package last updated on 27 Oct 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