This package allows you to run any cypher query you like agains your Neo4j instance in a promise-style.
The results will be formatted for your convenience.
To build the query check out the API docs of fluent-cypher
Table of Contents
You'll need to set env params to connect to neo4j
export NEO4J_URL="bolt://localhost:7687"export NEO4J_USER="neo4j"export NEO4J_PASS="neo4j"
Now you can use the package on the server.
const Neo4jQuery =//or
var query =
See constructor options of fluent-cypher
All methods return a promise. So after any fetch method building the query is not possible anymore.
Returns the first row of results as an object and if specified accesses the alias of the row.
Returns the first record, if specified the result will be brought top-level accessing the alias given.
Runs the native
run method of the driver returning unformatted results.
Use this method if you don't care about the result as it skips parsing of the result object.
example: Get the query result as the driver returns it
This will test against an online test instance
This will test against a local instance - you'll need to set env vars.
WARNING: Make sure you are using a test database as this adds and deletes data!
npm run test-local