Does cypher replaces neo4j traversal now-a-days? Is neo4j traversal deprecated now?
Asked
Active
Viewed 675 times
2 Answers
2
No, there are many cases where a manual traversal is useful. The Traversal
class is indeed deprecated but the TraversalDescription
isn't. You can get it via GraphDatabaseService#traversalDescription()
.

tstorms
- 4,941
- 1
- 25
- 47
-
Can I do it with REST? Can I retrieve all the node IDs that are connected to particular one node(taken as input) directly or indirectly? – manish Mar 26 '14 at 09:13
-
Sure, but you'll have to use cypher over REST. – tstorms Mar 26 '14 at 09:27
-
1There is separate traversal API via REST. Check this http://docs.neo4j.org/chunked/milestone/rest-api-traverse.html But I am not getting its explanation and also response gives a lot of URIs which will take more time if I want to fetch properties from these URIs. – manish Mar 26 '14 at 09:43
-
Didn't know about that one, thanks! You can access the REST traversal via the java-rest-binding project, see the `RestTraversal` class. It will hide all the URL's you are talking about. I'm not sure whether there's support for other programming languages. – tstorms Mar 27 '14 at 08:11
2
The documentation currently says it's deprecated, but staff says
We are officially continuing with the deprecation of the traversal API, BUT it will stick around and will be maintained until a suitable replacement is available, and that may not happen for awhile. We won't be pulling the rug out from under anyone's feet, this is just a step in preparation for something new.
July 29, 2020
https://community.neo4j.com/t/the-traversal-framework-in-v4/15989/4

Brian Burns
- 20,575
- 8
- 83
- 77
-
1I just checked the thread linked above. From staff Dec 2020: "As noted, the deprecation warning on the traversal API is to set the stage for a future replacement, but that may be 5.x or later. As mentioned, as there is no actual replacement implemented at this time, carry on as normal and make use of the traversal API as you like." – ruediste Jul 02 '21 at 08:19