node-red-neo4j 1.1.0
A Node-RED node for interacting with Neo4j
Node-RED Neo4j Project
This project includes a configuration node and a query node for interacting with a Neo4j database. The Neo4j Query Node is designed with developer friendliness in mind, allowing users to execute multiple queries in a single run without the need to build loops in Node-RED or manage complex flows.
Nodes
Neo4j Config Node
Properties:
- Name: (String, required) Name of the configuration.
 - URI: (String, required) Database URI (e.g., 
neo4j://localhost:7687). - Username: (String, required) Username for authentication.
 - Password: (String, required) Password for authentication.
 - Database Name: (String, optional) Default database name, defaults to 
default. 
Neo4j Query Node
Properties:
- Cypher Query: (String, required) The actual query to execute.
 - Parameters: (Object, optional) Accepts key-value pairs for parameterized queries.
 
Input Examples:
The Neo4j query node now supports executing multiple Cypher queries in a single input. The input payload can be either:
- A single object containing the query and its parameters:
{ "query": "MATCH (n) RETURN n", "params": {} } - An array of query objects:
[ { "query": "MATCH (n) RETURN n", "params": {} }, { "query": "MATCH (m:Label) WHERE m.property = $value RETURN m", "params": { "value": "someValue" } } ] 
In both cases, the results will be processed and returned as an array of objects.
Installation
Using npm
You can install the package via npm using the following command:
npm install node-red-neo4j
After installing, restart your Node-RED instance to see the nodes in your palette.
Using Node-RED Palette Manager
- Open your Node-RED editor in a web browser.
 - Click on the menu (the three horizontal lines in the top right corner) and select Manage palette.
 - Go to the Install tab.
 - In the search box, type 
node-red-neo4jand hit enter. - Click the install button next to the package when it appears in the search results.
 - Once installed, restart your Node-RED instance to see the nodes in your palette.
 
Changes in v0.2.1
Enhanced Transaction Management
- Implemented transaction management in the Neo4j query node to handle sessions properly and maintain data integrity during query execution.