# mulesoft Neo4j Connector - Full Documentation
---
product: Neo4j Connector
version: 4.0
is-latest-version: true
---
# Neo4j 4.0 Connector Reference
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Connector for Neo4j provides the capability to execute CQL statements and run basic
operations, such as create, update, delete, and select nodes against a Neo4j Graph database
instance.
Release Notes:
[Neo4j Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/neo4j-connector-release-notes-mule-4)
## Configurations
---
### Config
Default configuration
#### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Name | String | Name for this configuration. Connectors reference the configuration with this name. | | x |
Connection | | The connection types to provide to this configuration. | | x |
Name | | ID used to reference this configuration. | | x |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
#### Connection Types
##### Connection
###### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Username | | Username to authenticate against the proxy server. | | x |
Password | | Password to authenticate against the proxy server. | | x |
BOLT URL | | | | x |
Reconnection | | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy. | | |
## Supported Operations
- [Create Node](#CreateNode)
- [Delete Nodes](#DeleteNodes)
- [Execute](#Execute)
- [Select Nodes](#SelectNodes)
- [Update Nodes](#UpdateNodes)
## Operations
## Create Node
``
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Label | | | | x |
Input | | | | |
Config Ref | | Name of the configuration to use to execute this component. | | x |
Error Mappings | | Set of error mappings | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### For Configurations
- [Config](#Config)
### Throws
- NEO4J:AUTHENTICATION\_ERROR
- NEO4J:CLIENT\_ERROR
- NEO4J:CONNECTION\_ERROR
- NEO4J:CONNECTIVITY
- NEO4J:DATABASE\_EXCEPTION
- NEO4J:INCORRECT\_CREDENTIALS
- NEO4J:INVALID\_SESSION
- NEO4J:JSON\_PROCESSING\_ERROR
- NEO4J:NEO4J\_DRIVER\_EXCEPTION
- NEO4J:NO\_SUCH\_RECORD\_EXCEPTION
- NEO4J:PROTOCOL\_EXCEPTION
- NEO4J:REQUEST\_FAILED
- NEO4J:RETRY\_EXHAUSTED
- NEO4J:SECURITY\_EXCEPTION
- NEO4J:SERVICE\_UNAVAILABLE\_EXCEPTION
- NEO4J:SESSION\_EXPIRED\_EXCEPTION
- NEO4J:TRANSIENT\_EXCEPTION
- NEO4J:UNKNOWN\_HOST
## Delete Nodes
``
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Label | | | | x |
Remove Relationships | | | false | |
Parameters | | | | |
Config Ref | | Name of the configuration to use to execute this component. | | x |
Error Mappings | | Set of error mappings | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### For Configurations
- [Config](#Config)
### Throws
- NEO4J:AUTHENTICATION\_ERROR
- NEO4J:CLIENT\_ERROR
- NEO4J:CONNECTION\_ERROR
- NEO4J:CONNECTIVITY
- NEO4J:DATABASE\_EXCEPTION
- NEO4J:INCORRECT\_CREDENTIALS
- NEO4J:INVALID\_SESSION
- NEO4J:JSON\_PROCESSING\_ERROR
- NEO4J:NEO4J\_DRIVER\_EXCEPTION
- NEO4J:NO\_SUCH\_RECORD\_EXCEPTION
- NEO4J:PROTOCOL\_EXCEPTION
- NEO4J:REQUEST\_FAILED
- NEO4J:RETRY\_EXHAUSTED
- NEO4J:SECURITY\_EXCEPTION
- NEO4J:SERVICE\_UNAVAILABLE\_EXCEPTION
- NEO4J:SESSION\_EXPIRED\_EXCEPTION
- NEO4J:TRANSIENT\_EXCEPTION
- NEO4J:UNKNOWN\_HOST
## Execute
``
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Query | | | | x |
Input | | | | |
Config Ref | | Name of the configuration to use to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Target Variable | | Name of the variable that storesoperation’s output will be placed | | |
Target Value | | An expression to evaluate against the operation’s output and store the expression outcome in the target variable | #[payload] | |
Error Mappings | | Set of error mappings | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Config](#Config)
### Throws
- NEO4J:AUTHENTICATION\_ERROR
- NEO4J:CLIENT\_ERROR
- NEO4J:CONNECTION\_ERROR
- NEO4J:CONNECTIVITY
- NEO4J:DATABASE\_EXCEPTION
- NEO4J:INCORRECT\_CREDENTIALS
- NEO4J:INVALID\_SESSION
- NEO4J:JSON\_PROCESSING\_ERROR
- NEO4J:NEO4J\_DRIVER\_EXCEPTION
- NEO4J:NO\_SUCH\_RECORD\_EXCEPTION
- NEO4J:PROTOCOL\_EXCEPTION
- NEO4J:REQUEST\_FAILED
- NEO4J:RETRY\_EXHAUSTED
- NEO4J:SECURITY\_EXCEPTION
- NEO4J:SERVICE\_UNAVAILABLE\_EXCEPTION
- NEO4J:SESSION\_EXPIRED\_EXCEPTION
- NEO4J:TRANSIENT\_EXCEPTION
- NEO4J:UNKNOWN\_HOST
## Select Nodes
``
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Label | | | | x |
Input | | | | |
Config Ref | | Name of the configuration to use to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Target Variable | | Name of the variable that storesoperation’s output will be placed | | |
Target Value | | An expression to evaluate against the operation’s output and store the expression outcome in the target variable | #[payload] | |
Error Mappings | | Set of error mappings | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Config](#Config)
### Throws
- NEO4J:AUTHENTICATION\_ERROR
- NEO4J:CLIENT\_ERROR
- NEO4J:CONNECTION\_ERROR
- NEO4J:CONNECTIVITY
- NEO4J:DATABASE\_EXCEPTION
- NEO4J:INCORRECT\_CREDENTIALS
- NEO4J:INVALID\_SESSION
- NEO4J:JSON\_PROCESSING\_ERROR
- NEO4J:NEO4J\_DRIVER\_EXCEPTION
- NEO4J:NO\_SUCH\_RECORD\_EXCEPTION
- NEO4J:PROTOCOL\_EXCEPTION
- NEO4J:REQUEST\_FAILED
- NEO4J:RETRY\_EXHAUSTED
- NEO4J:SECURITY\_EXCEPTION
- NEO4J:SERVICE\_UNAVAILABLE\_EXCEPTION
- NEO4J:SESSION\_EXPIRED\_EXCEPTION
- NEO4J:TRANSIENT\_EXCEPTION
- NEO4J:UNKNOWN\_HOST
## Update Nodes
``
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Label | | | | x |
Parameters | | | | |
Set Parameters | | | #[payload] | |
Config Ref | | Name of the configuration to use to execute this component. | | x |
Error Mappings | | Set of error mappings | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### For Configurations
- [Config](#Config)
### Throws
- NEO4J:AUTHENTICATION\_ERROR
- NEO4J:CLIENT\_ERROR
- NEO4J:CONNECTION\_ERROR
- NEO4J:CONNECTIVITY
- NEO4J:DATABASE\_EXCEPTION
- NEO4J:INCORRECT\_CREDENTIALS
- NEO4J:INVALID\_SESSION
- NEO4J:JSON\_PROCESSING\_ERROR
- NEO4J:NEO4J\_DRIVER\_EXCEPTION
- NEO4J:NO\_SUCH\_RECORD\_EXCEPTION
- NEO4J:PROTOCOL\_EXCEPTION
- NEO4J:REQUEST\_FAILED
- NEO4J:RETRY\_EXHAUSTED
- NEO4J:SECURITY\_EXCEPTION
- NEO4J:SERVICE\_UNAVAILABLE\_EXCEPTION
- NEO4J:SESSION\_EXPIRED\_EXCEPTION
- NEO4J:TRANSIENT\_EXCEPTION
- NEO4J:UNKNOWN\_HOST
## Types
### Reconnection
Configures a reconnection strategy for an operation.
| Field | Type | Description | Default Value | Required |
|---|
Fails Deployment | | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy. | | |
Reconnection Strategy | | Reconnection strategy to use. | | |
### Reconnect
Configures a standard reconnection strategy, which specifies how often to reconnect and how many
reconnection attempts the connector source or operation can make.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
Count | | How many reconnection attempts the Mule app can make. | | |
### Reconnect Forever
Configures a forever reconnection strategy by which the connector source or operation attempts to
reconnect at a specified frequency for as long as the Mule app runs.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
### Expiration Policy
Configures an expiration policy strategy.
| Field | Type | Description | Default Value | Required |
|---|
Max Idle Time | | Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
Time Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Max Idle Time field. | | |
### Error Mapping
| Field | Type | Description | Default Value | Required |
|---|
Source | ANY REDELIVERY_EXHAUSTED TRANSFORMATION EXPRESSION SECURITY CLIENT_SECURITY SERVER_SECURITY ROUTING CONNECTIVITY RETRY_EXHAUSTED TIMEOUT
| | | |
Target | | | | |
### Repeatable In Memory Stream
Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX
buffer size. Always run performance tests to find the optimal buffer size for your specific use
case.
| Field | Type | Description | Default Value | Required |
|---|
Initial Buffer Size | | Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value. | | |
Buffer Size Increment | | This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full. | | |
Max Buffer Size | | Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a STREAM_MAXIMUM_SIZE_EXCEEDED error. A value of less than or equal to 0 means no limit. | | |
Buffer Unit | | Unit for the Initial Buffer Size, Buffer Size Increment, and Buffer Unit fields. | | |
### Repeatable File Store Stream
Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream
content in memory. If the stream content is larger than the configured buffer size, Mule backs up
the buffer’s content to disk and then clears the memory.
| Field | Type | Description | Default Value | Required |
|---|
In Memory Size | | Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance: Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory. Configure a smaller buffer size to decrease memory load at the expense of response time.
| | |
Buffer Unit | | Unit for the In Memory Size field. | | |
---
product: Neo4j Connector
version: 3.0
---
# Neo4j Connector
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Neo4j Connector v3.0
Anypoint Connector for Neo4j provides the capability to execute CQL statements and run basic
operations, such as create, update, delete, and select nodes against a Neo4j Graph database
instance.
Release Notes:
[Neo4j Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/neo4j-connector-release-notes-mule-4)
Exchange:
[Neo4j Connector](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-neo4j-connector/)
## Before You Begin
To use this information, you need to be familiar with Neo4j, Mule, Anypoint Connectors, Anypoint
Studio, Mule concepts, elements in a Mule flow, and Global Elements.
You need login credentials to test your connection to your target resource.
For software requirements and compatibility information, see the Connector Release Notes.
## POM File Information
```xml
com.mulesoft.connectors
mule-neo4j-connector
x.x.x
mule-plugin
```
Replace `x.x.x` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information, access the connector in
[Anypoint Exchange](https://www.mulesoft.com/exchange/) and click **Dependency Snippets**.
## Metadata
Neo4j connector metadata is based on the following premises:
- Labels listed on operations are the labels that are instanced in the database.
- The database has these constraints for its nodes:
- Unique property constraints.
- Property existence constraints.
- At least one node with constraint values defined in the database.
## Add the Connector to a Studio Project
Anypoint Studio provides two ways to add the connector to your Studio project: from the Exchange
button in the Studio taskbar or from the Mule Palette view.
### Add the Connector Using Exchange
1. In Studio, create a Mule project.
2. Click the Exchange icon **(X)** in the upper-left of the Studio task bar.
3. In Exchange, click **Login** and supply your Anypoint Platform username and password.
4. In Exchange, search for "neo4j".
5. Select the connector and click **Add to project**.
6. Follow the prompts to install the connector.
### Add the Connector in Studio
1. In Studio, create a Mule project.
2. In the Mule Palette view, click **(X) Search in Exchange**.
3. In **Add Modules to Project**, type "neo4j" in the search field.
4. Click this connector’s name in **Available modules**.
5. Click **Add**.
6. Click **Finish**.
### Configure in Studio
1. Drag a Neo4j operation to the Studio Canvas.
2. Select the operation.

| Name | Description |
|---|
Execute | Execute any CQL statement against DB. |
Create Node | Create a node with a specific initial label. Optionally, properties for the node can be added. |
Select Nodes | Query nodes with a specific label. Optionally, properties used as filter can be provided. |
Update Nodes | Modified properties for one or multiple nodes with a specific label. Optional Properties can be added as search filter criteria. |
Delete Nodes | Delete one or multiples nodes based on a specific label. This lets you delete nodes with inbound/outbound relationships. Optional Properties can be added as search filter criteria. |
Note: The Neo4j connector’s basic operations can filter nodes by only one label in its query. If
you want to filter in a query by multiple labels, use the Execute operation with a proper CQL
statement.
3. Configure the Global element for the connector.

| Field | Description |
|---|
Username | Enter the username to log in with. |
Password | Enter the corresponding password. |
BOLT URL | |
REST URL | Rest endpoint URL (works with HTTP or HTTPS). |
## Use Case: Node Basic CRUD

1. Create a new Mule Project in Anypoint Studio and set your Neo4j environment properties in
`src/main/resources/automation-credentials.properties`.
```text
config.username=
config.password=
config.boltUrl=
config.restUrl=
```
2. Drag an HTTP connector onto the canvas and configure it with the default values.
3. Drag a Transform Message onto the canvas and create a flowVar called params with the following
code:
```dataweave
%dw 2.0
%output application/json
---
{
"name":"Tom Hanks",
"born": 1956
}
```
4. Drag the Neo4j connector onto the canvas and configure a new global element according to the
table below:
| Parameter | Value |
|---|
Username | |
Password | |
BOLT URL | |
REST URL | |
```xml
```
5. In the Properties Editor, configure:
| Parameter | Value |
|---|
Display Name | |
Connector Configuration | Neo4j__Basic_Authentication |
Operation | |
Label | |
Parameters Reference | |

Note: Click Test Connection to confirm that Mule can connect with the Neo4j instance. If the
connection is successful, click OK to save the configuration. Otherwise, review or correct any
invalid parameters and test again.
6. Drag a Neo4j connector onto the canvas, in the Properties Editor, configure the parameters:
| Parameter | Value |
|---|
Operation | |
Label | |
7. Drag a Neo4j connector onto the canvas, in the Properties Editor, configure the parameters:
| Parameter | Value |
|---|
Operation | |
Label | |
8. Drag an Transform Message onto the canvas.
```dataweave
%dw 2.0
%output application/json
---
payload
```
9. Save the changes and deploy the project as a Mule Application. Open a browser and make a request
to the following URL:
```none
http://localhost:8081/CRUD
```
If the node was successfully created and deleted, information displays in a JSON format:
```json
{ "born": 1956, "name": "Tom Hanks" }
```
### Create a Node with Multiple Labels

1. Create a new Mule Project in Anypoint Studio and set your Neo4j environment properties in
`src/main/resources/automation-credentials.properties`.
```text
config.username=
config.password=
config.boltUrl=
config.restUrl=
```
2. Drag an HTTP connector onto the canvas and configure it with the default values.
3. Drag a Transform Message onto the canvas and create two flowVars with the following code:
1. Variable-create
```dataweave
%dw 2.0
%output application/json
---
"CREATE (a:ACTOR:PERSON { name:\"Tom Hanks\", born:1956 })"
```
2. Variable-select
```dataweave
%dw 2.0
%output application/json
---
"MATCH (a:ACTOR:PERSON) RETURN a"
```
4. Drag the Neo4j connector onto the canvas and configure a new Global Element according to the
table below:
| Parameter | Value |
|---|
Username | |
Password | |
BOLT URL | |
REST URL | |
```xml
```
5. In the Properties Editor, configure:
| Parameter | Value |
|---|
Display Name | |
Connector Configuration | Neo4j__Basic_Authentication |
Operation | |
Query | |
Parameters Reference | |

Click Test Connection to confirm that Mule can connect with the Neo4j instance. If the
connection is successful, click OK to save the configuration. Otherwise, review or correct any
invalid parameters and test again.
6. Drag a Neo4j connector onto the canvas, in the Properties Editor, configure the parameters:
| Parameter | Value |
|---|
Display Name | Select node (Multi-label) |
Operation | |
Query | |
7. Drag a Transform Message onto the canvas.
8. Drag a Logger onto the canvas.
9. Save the changes and deploy the project as a Mule Application. Open a browser and make a request
to the following URL:
```none
http://localhost:8081/createNodeMultiLabel
```
If the node was successfully created and deleted, information displays in a JSON format:
```json
[{ "a": { "born": 1956, "name": "Tom Hanks" } }]
```
## Use Case: XML
```xml
```
## See Also
- [Neo4j Connector Reference](https://docs.mulesoft.com/neo4j-connector/3.0/neo4j-connector-reference)
- [Salesforce Help](https://help.salesforce.com)
---
product: Neo4j Connector
version: 4.0
is-latest-version: true
---
# Neo4j Connector
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Neo4j Connector v4.0
Anypoint Connector for Neo4j provides the capability to execute CQL statements and run basic
operations, such as create, update, delete, and select nodes against a Neo4j Graph database
instance.
Release Notes:
[Neo4j Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/neo4j-connector-release-notes-mule-4)
Exchange:
[Neo4j Connector](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-neo4j-connector/)
## Before You Begin
To use this information, you need to be familiar with Neo4j, Mule, Anypoint Connectors, Anypoint
Studio, Mule concepts, elements in a Mule flow, and Global Elements.
You need login credentials to test your connection to your target resource.
For software requirements and compatibility information, see the Connector Release Notes.
## POM File Information
```xml
com.mulesoft.connectors
mule-neo4j-connector
4.0.0
mule-plugin
```
Replace `4.0.0` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information, access the connector in
[Anypoint Exchange](https://www.mulesoft.com/exchange/) and click **Dependency Snippets**.
## Metadata
**Version 4.0.0 Enhancement**: The Neo4j connector now provides comprehensive metadata resolution
for improved Anypoint Studio experience.
Neo4j connector metadata is based on the following premises:
- **Dynamic Label Discovery**: Labels are automatically discovered from the database using native
Cypher queries
- **Sample-Based Field Resolution**: Metadata fields are generated from actual node properties in
the database
- **Comprehensive Type Mapping**: All node properties are included in metadata, not just constraint
fields
- **BOLT-Only Operation**: All metadata resolution uses the BOLT connection (no REST API required)
For optimal metadata experience: \* Ensure sample data exists in your Neo4j database for the labels
you plan to use \* The connector will display all properties found in sample nodes for comprehensive
field suggestions \* Metadata is generated dynamically and reflects the actual data structure in
your database
## Add the Connector to a Studio Project
Anypoint Studio provides two ways to add the connector to your Studio project: from the Exchange
button in the Studio taskbar or from the Mule Palette view.
### Add the Connector Using Exchange
1. In Studio, create a Mule project.
2. Click the Exchange icon **(X)** in the upper-left of the Studio task bar.
3. In Exchange, click **Login** and supply your Anypoint Platform username and password.
4. In Exchange, search for "neo4j".
5. Select the connector and click **Add to project**.
6. Follow the prompts to install the connector.
### Add the Connector in Studio
1. In Studio, create a Mule project.
2. In the Mule Palette view, click **(X) Search in Exchange**.
3. In **Add Modules to Project**, type "neo4j" in the search field.
4. Click this connector’s name in **Available modules**.
5. Click **Add**.
6. Click **Finish**.
### Configure in Studio
1. Drag a Neo4j operation to the Studio Canvas.
2. Select the operation.

| Name | Description |
|---|
Execute | Execute any CQL statement against DB. |
Create Node | Create a node with a specific initial label. Optionally, properties for the node can be added. |
Select Nodes | Query nodes with a specific label. Optionally, properties used as filter can be provided. |
Update Nodes | Modified properties for one or multiple nodes with a specific label. Optional Properties can be added as search filter criteria. |
Delete Nodes | Delete one or multiples nodes based on a specific label. This lets you delete nodes with inbound/outbound relationships. Optional Properties can be added as search filter criteria. |
Note: The Neo4j connector’s basic operations can filter nodes by only one label in its query. If
you want to filter in a query by multiple labels, use the Execute operation with a proper CQL
statement.
3. Configure the Global element for the connector.

| Field | Description |
|---|
Username | Enter the username to log in with. |
Password | Enter the corresponding password. |
BOLT URL | Bolt endpoint URL. Version 4.0.0: This is the only required connection parameter. |
## Use Case: Node Basic CRUD

1. Create a new Mule Project in Anypoint Studio and set your Neo4j environment properties in
`src/main/resources/automation-credentials.properties`.
```text
config.username=
config.password=
config.boltUrl=
```
2. Drag an HTTP connector onto the canvas and configure it with the default values.
3. Drag a Transform Message onto the canvas and create a flowVar called params with the following
code:
```dataweave
%dw 2.0
%output application/json
---
{
"name":"Tom Hanks",
"born": 1956
}
```
4. Drag the Neo4j connector onto the canvas and configure a new global element according to the
table below:
| Parameter | Value |
|---|
Username | |
Password | |
BOLT URL | |
```xml
```
5. In the Properties Editor, configure:
| Parameter | Value |
|---|
Display Name | |
Connector Configuration | Neo4j__Basic_Authentication |
Operation | |
Label | |
Parameters Reference | |

Note: Click Test Connection to confirm that Mule can connect with the Neo4j instance. If the
connection is successful, click OK to save the configuration. Otherwise, review or correct any
invalid parameters and test again.
6. Drag a Neo4j connector onto the canvas, in the Properties Editor, configure the parameters:
| Parameter | Value |
|---|
Operation | |
Label | |
7. Drag a Neo4j connector onto the canvas, in the Properties Editor, configure the parameters:
| Parameter | Value |
|---|
Operation | |
Label | |
8. Drag an Transform Message onto the canvas.
```dataweave
%dw 2.0
%output application/json
---
payload
```
9. Save the changes and deploy the project as a Mule Application. Open a browser and make a request
to the following URL:
```none
http://localhost:8081/CRUD
```
If the node was successfully created and deleted, information displays in a JSON format:
```json
{ "born": 1956, "name": "Tom Hanks" }
```
### Create a Node with Multiple Labels

1. Create a new Mule Project in Anypoint Studio and set your Neo4j environment properties in
`src/main/resources/automation-credentials.properties`.
```text
config.username=
config.password=
config.boltUrl=
```
2. Drag an HTTP connector onto the canvas and configure it with the default values.
3. Drag a Transform Message onto the canvas and create two flowVars with the following code:
1. Variable-create
```dataweave
%dw 2.0
%output application/json
---
"CREATE (a:ACTOR:PERSON { name:\"Tom Hanks\", born:1956 })"
```
2. Variable-select
```dataweave
%dw 2.0
%output application/json
---
"MATCH (a:ACTOR:PERSON) RETURN a"
```
4. Drag the Neo4j connector onto the canvas and configure a new Global Element according to the
table below:
| Parameter | Value |
|---|
Username | |
Password | |
BOLT URL | |
```xml
```
5. In the Properties Editor, configure:
| Parameter | Value |
|---|
Display Name | |
Connector Configuration | Neo4j__Basic_Authentication |
Operation | |
Query | |
Parameters Reference | |

Click Test Connection to confirm that Mule can connect with the Neo4j instance. If the
connection is successful, click OK to save the configuration. Otherwise, review or correct any
invalid parameters and test again.
6. Drag a Neo4j connector onto the canvas, in the Properties Editor, configure the parameters:
| Parameter | Value |
|---|
Display Name | Select node (Multi-label) |
Operation | |
Query | |
7. Drag a Transform Message onto the canvas.
8. Drag a Logger onto the canvas.
9. Save the changes and deploy the project as a Mule Application. Open a browser and make a request
to the following URL:
```none
http://localhost:8081/createNodeMultiLabel
```
If the node was successfully created and deleted, information displays in a JSON format:
```json
[{ "a": { "born": 1956, "name": "Tom Hanks" } }]
```
## Use Case: XML
```xml
```
## Upgrading from Version 3.x
**Important**: Version 4.0.0 contains breaking changes. If you are upgrading from version 3.x, see
[Neo4j Connector Upgrade and Migration Guide](https://docs.mulesoft.com/neo4j-connector/latest/neo4j-connector-upgrade-migrate) for detailed
migration instructions.
**Key Changes in Version 4.0.0:** \* **REST URL parameter removed**: Only BOLT URL is required for
configuration \* **Enhanced metadata resolution**: Comprehensive field suggestions in Anypoint
Studio \* **Minimum requirements updated**: Neo4j 4.4+, JDK 17+, Mule Runtime 4.9.0+ \* **Modern
Neo4j driver**: Upgraded to Neo4j Java Driver 5.28.8 \* **Code quality enhancements**: Improved
error handling, modern Java 17+ features, and better internal architecture
## See Also
- [Neo4j Connector Upgrade and Migration Guide](https://docs.mulesoft.com/neo4j-connector/latest/neo4j-connector-upgrade-migrate)
- [Neo4j Connector Reference](https://docs.mulesoft.com/neo4j-connector/latest/neo4j-connector-reference)
- [Salesforce Help](https://help.salesforce.com)
---
product: Neo4j Connector
version: 3.0
---
# Neo4j Connector Reference
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Neo4j Connector v3.0
Release Notes:
[Neo4j Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/neo4j-connector-release-notes-mule-4)
## Default Configuration
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Name | String | The name for this configuration. Connectors reference the configuration with this name. | | x |
Connection | | The connection types that can be provided to this configuration. | | x |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before the runtime considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. The runtime purges the instances when it sees fit. | | |
## Connection Type
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Username | | | | x |
Password | | | | x |
BOLT URL | | | | x |
REST URL | | | | x |
Reconnection | | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy. | | |
### Associated Operations
- createNode
- deleteNodes
- execute
- selectNodes
- updateNodes
## Operations
## Create Node
``
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | The name of the configuration to use. | | x |
Label | | | | x |
Input | | | | |
Reconnection Strategy | reconnect reconnect-forever
| A retry strategy in case of connectivity errors. | | |
### For Configurations
- config
### Throws
- NEO4J:CONNECTIVITY
- NEO4J:RETRY\_EXHAUSTED
## Delete Nodes
``
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | The name of the configuration to use. | | x |
Label | | | | x |
Remove Relationships | | | false | |
Parameters | | | | |
Reconnection Strategy | reconnect reconnect-forever
| A retry strategy in case of connectivity errors. | | |
### For Configurations
- config
### Throws
- NEO4J:CONNECTIVITY
- NEO4J:RETRY\_EXHAUSTED
## Execute
``
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | The name of the configuration to use. | | x |
Query | | | #[payload]
| |
Input | | | | |
Streaming Strategy | | Configure if repeatable streams should be used and their behavior. | | |
Target Variable | | The name of a variable on which the operation’s output is placed. | | |
Target Value | | An expression to evaluate against the operation’s output and the outcome of that expression is stored in the target variable. | #[payload]
| |
Reconnection Strategy | reconnect reconnect-forever
| A retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- config
### Throws
- NEO4J:CONNECTIVITY
- NEO4J:RETRY\_EXHAUSTED
## Select Nodes
``
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | The name of the configuration to use. | | x |
Label | | | | x |
Input | | | | |
Target Variable | | The name of a variable on which the operation’s output is placed. | | |
Target Value | | An expression to evaluate against the operation’s output and the outcome of that expression is stored in the target variable. | #[payload]
| |
Reconnection Strategy | reconnect reconnect-forever
| A retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- config
### Throws
- NEO4J:CONNECTIVITY
- NEO4J:RETRY\_EXHAUSTED
## Update Nodes
``
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | The name of the configuration to use. | | x |
Label | | | | x |
Parameters | | | | |
Set Parameters | | | #[payload]
| |
Reconnection Strategy | reconnect reconnect-forever
| A retry strategy in case of connectivity errors. | | |
### For Configurations
- config
### Throws
- NEO4J:CONNECTIVITY
- NEO4J:RETRY\_EXHAUSTED
## Types
### Reconnection
| Field | Type | Description | Default Value | Required |
|---|
Fails Deployment | | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy. | | |
Reconnection Strategy | reconnect reconnect-forever
| The reconnection strategy to use. | | |
### Reconnect
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to reconnect (in milliseconds). | | |
Count | | The number of reconnection attempts to make. | | |
blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
### Reconnect Forever
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often in milliseconds to reconnect. | | |
blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
### Expiration Policy
| Field | Type | Description | Default Value | Required |
|---|
Max Idle Time | | A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration. | | |
Time Unit | Enumeration, one of: NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS ** DAYS | A time unit that qualifies the maxIdleTime attribute. | | |
### Repeatable In Memory Stream
| Field | Type | Description | Default Value | Required |
|---|
Initial Buffer Size | | This is the amount of memory to allocate to consume the stream and provide random access to it. If the stream contains more data than can be fit into this buffer, then the buffer expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize. | | |
Buffer Size Increment | | This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full. | | |
Max Buffer Size | | This is the maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower or equal to zero means no limit. | | |
Buffer Unit | Enumeration, one of: BYTE KB MB GB | The unit in which all these attributes are expressed | | |
### Repeatable File Store Stream
| Field | Type | Description | Default Value | Required |
|---|
Max In Memory Size | | Defines the maximum memory that the stream should use to keep data in memory. If more memory is consumed, the connector starts to buffer the content on disk. | | |
Buffer Unit | Enumeration, one of: BYTE KB MB GB | The unit in which maxInMemorySize is expressed | | |
## See Also
- [Neo4j Connector Overview](https://docs.mulesoft.com/neo4j-connector/3.0/)
- [Salesforce Help](https://help.salesforce.com)
---
product: Neo4j Connector
version: 4.0
is-latest-version: true
---
# Upgrading and Migrating Neo4j Connector to Version 4.0.0
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Upgrade Anypoint Connector for Neo4j (Neo4j Connector) to version 4.0.0.
## Supported Upgrade Paths
## Changes in This Release
This release contains significant changes:
- Upgraded the Neo4j Java driver from version 1.7.6 to 5.28.8.
- Updated Neo4j server requirements to version 4.4 and later (previously supported Neo4j 3.x).
- Required minimum JDK 17 (upgraded from JDK 8).
- Updated minimum Mule runtime engine (Mule) to 4.9.0 (upgraded from 4.1.x).
- Removed the **REST URL** parameter from the connector configuration.
- Overhauled input and output metadata resolution for a better Anypoint Studio experience.
- Provided full compatibility with Neo4j 5.x and 2025.x server features.
- Gained access to reactive APIs, multi-database support, and enhanced security.
- Updated Docker configuration settings to use current Neo4j standards.
- Changed the connector to only require a BOLT URL configuration.
- Changed all metadata operations to use native Cypher queries through a BOLT connection instead of
REST API calls.
## Requirements
Ensure that you meet these requirements before you perform the upgrade.
### Neo4j Server Requirements
- The minimum Neo4j server version required is 4.4 LTS or later.
- The recommended versions are Neo4j 5.26 LTS or Neo4j 2025.06+.
- Neo4j 3.x servers are no longer supported.
### Java Runtime Requirements
- The minimum JDK version required is 17
- The only supported JDK version is 17
- JDK 8 and 11 are no longer supported
### Mule Requirements
- Minimum Mule version 4.9.0, required for JDK 17 support and unified connectors parent
compatibility
- Mule versions 4.1.x - 4.8.x not supported
### Development Environment
- Anypoint Studio latest version supporting Mule Runtime 4.9.0+
- Maven version supporting JDK 17+
## Considerations
Before you perform the upgrade, be aware of these known limitations:
- Restore from backup to roll back after upgrading the connector.
- Avoid using Neo4j 3.x servers with connector version 4.0.0.
- Ensure Mule applications run on Mule 4.9.0+ and JDK 17+.
- Update existing configurations that use the REST URL parameter.
- Re-test all existing connections after upgrading the connector.
- Refresh Studio metadata for the connector operations.
- Upgrade test servers to Neo4j version 4.4+ before performing connector testing.
- Use a JDK 17+ toolchain for Maven builds.
## Upgrade Prerequisites
Before you perform the upgrade, you must complete the following.
### Prepare Your Environment
1. Create a backup of your Mule applications, data, and configurations
2. Upgrade Neo4j Server to version 4.4 LTS or later (if currently using Neo4j 3.x)
3. Upgrade Mule to version 4.9.0 or higher
4. Upgrade JDK to version 17 or higher on all environments (development, test, production)
### Asses Mule Application
1. Review existing configurations to identify REST URL usage.
2. Document current BOLT URL settings for post-upgrade validation.
3. Test connectivity to make sure Neo4j servers are accessible via BOLT protocol.
4. Identify custom error handling that references connector-specific error types.
## Upgrade the Connector in Anypoint Code Builder
Follow these steps to perform the upgrade:
1. In **Explorer**, right-click the configuration XML file in your integration project, and select
**Project Properties**.
2. In **Project Properties**, select **Connectors**.
3. Select the latest version for the connector, and click **Apply**.
## Upgrade the Connector in Studio
Follow these steps to perform the upgrade:
1. In Anypoint Studio, open your existing Mule project.
2. In **Mule Palette**, click **Search in Exchange**.
3. In **Add Dependencies to Project**, enter `neo4j` in the search field.
4. In **Available modules**, select **Neo4j Connector** and click **Add**.
5. Click **Finish**.
6. Verify that the Neo4j Connector `` version is `4.0.0` in the `pom.xml` file in the
Mule project:
```xml
com.mulesoft.connectors
mule-neo4j-connector
4.0.0
mule-plugin
```
Studio upgrades the connector automatically, but configuration changes are required.
## Post Upgrade Steps
After you install the latest version of the connector, follow these steps to complete the upgrade:
### Remove REST URL Parameter
The REST URL parameter is no longer supported in the connector configuration. Update your
configurations:
Before (Version 3.x):
```xml
```
After (Version 4.0.0):
```xml
```
### Update Connection Properties
Remove the REST URL property from your configuration files:
Before:
```text
config.username=
config.password=
config.boltUrl=
config.restUrl=
```
After:
```text
config.username=
config.password=
config.boltUrl=
```
### Update Runtime Environment
1. Make sure all environments are running on Mule 4.9.0+.
2. Verify all environments are using JDK 17+.
3. Make sure Neo4j servers are version 4.4+ or 5.x.
### Refresh Metadata
1. Regenerate metadata in Anypoint Studio for improved design-time experience.
2. Test the connector operations to ensure metadata is properly resolved.
3. Validate the DataWeave expressions benefit from enhanced type information.
### Verify the Upgrade
After you install the latest version of the connector, verify the upgrade:
1. Make sure no REST URL references remain in configurations.
2. Verify the `pom.xml` file shows version 4.0.0 of the Neo4j Connector.
3. Use the **Test Connection** feature to validate BOLT connectivity.
4. Check that the operations show comprehensive field suggestions in Studio.
5. Execute existing unit tests to ensure functionality is preserved.
6. Verify no deprecation warnings appear during application startup.
## Troubleshooting
If you encounter issues, perform these troubleshooting ste\[s\].
### Troubleshoot Connection Failures After Upgrade
If the connector cannot connect to Neo4j server after upgrade, follow these steps:
1. Verify that the Neo4j server is version 4.4+ (Neo4j 3.x is no longer supported).
2. Make sure the BOLT protocol is enabled on Neo4j server.
3. Remove any REST URL references from the configuration.
Error example:
`Neo4j.ClientError.Security.Unauthorized`
Therefore, verify credentials and server accessibility via BOLT port (default 7687).
### Troubleshoot Metadata Not Displaying in Studio
If the connector operations show empty metadata or missing field suggestions, try these steps to
solve the issue:
1. Ensure sample data exists in your Neo4j database for the labels you’re using.
2. Regenerate metadata by refreshing the connector in Studio.
3. Verify the BOLT connection is working properly.
### Troubleshoot Runtime Compatibility Issues
If the Mule application fails to start with JDK or Mule runtime errors, try these steps:
1. Upgrade to JDK 17+ (JDK 8/11 no longer supported).
2. Upgrade to Mule Runtime 4.9.0+ (earlier versions incompatible).
3. Update Maven build configuration for JDK 17 compatibility.
### Revert the Upgrade
If you need to revert to the previous version of Neo4j Connector, go to Anypoint Studio and in the
project’s `pom.xml` file, change the `mule-neo4j-connector` dependency version 3.0.0 to the previous
version.
> [!IMPORTANT] Reverting requires restoring to environments compatible with version 3.x
> requirements.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)