Set Relationship Types
The available procedure is described in the table below:
Qualified Name | Type | Release |
---|---|---|
|
|
Example Usage
The example below will help us learn how to use this procedure.
The following creates a graph containing two nodes connected by a relationship:
CREATE (f:Foo)-[rel:FOOBAR]->(b:Bar)

The following changes the relationship type from
FOOBAR
to NEW-TYPE
MATCH (f:Foo)-[rel:FOOBAR]->(b:Bar)
CALL apoc.refactor.setType(rel, 'NEW-TYPE')
YIELD input, output
RETURN input, output
If we execute this query, it will result in the following graph:
