Im currently building something with Neo4j and Neography and were wondering what is preferred: Using the traverse method or a Cypher query?
Personally, I like Cypher, but I have no idea which is better/more performant
I'm sure they both have their sweet spots, and Cypher probably already being more intuitive to express your queries in. Try forming your queries with Cypher if that is to your liking and if the performance satisfies you then all good! If not then perhaps try it out in the traversal framework.
I have just created a benchmark for friend of a friend queries for Cypher vs Core API and the Traverser Framework on a graph with about 1 mio nodes. FOAF queries are not very complex but a good use case for graph data bases like neo4j.
You can see that Cypher performs much worse than the core API.
Cypher is indeed intuitive as Matthias pointed out, however I have the following recommendation:
If its trivial stuff, go Cypher, its easier to write (actually a joy) and there shouldn't be any big performance penalty. However, once you have larger matchings or conditional queries, having domain knowledge of your graph might significantly boost performance if you use custom traversers or even Gremlin