Cypher graph database query engine and graph database in Javascript. The Cypher query language in your browser! Zero dependencies
For inquiries, reach out to Cypher.js author Niclas Kjäll-Ohlsson (niclas@fusebase.io).
Demos
- Just for fun: https://bit.ly/2Dbylrh
- Molecule interactions
- Game of Thrones: https://bit.ly/2QoBSG9
- Time series analysis: https://bit.ly/2zSQkzt
- Generate random strings: https://bit.ly/2FoJcAW
- Bill of material explosion: https://bit.ly/2DoKJE6
- Star Wars characters
New! Check out this script for how to do prompt chaining, query a LLM API, create and visualize a graph with one Cypher statement in Cypher.js:
Client-side (web browser)
-
Include
<script type="text/javascript" src="Cypher.min.js"></script>
-
Use
var cypher = new Cypher({runInWebWorker: true}); var query = 'merge (n:Test{what:"Hello World"}) return n'; cypher.execute( query, function(results) { console.log(results); }, function(errorText) { console.log(errorText); } );
Node.js
// Dependency to https package
var https = require("https");
var Cypher = require("Cypher.min.js").Cypher;
var options = {
// In Node.js the runInWebWorker option must be set to false
// Web Workers are not supported in Node.js
runInWebWorker: false,
};
var cypher = new Cypher(options);
cypher.execute(
'unwind range(0,10) as item return item',
function(results) {
console.log(JSON.stringify(results));
},
function(error) {
console.log(error);
}
);