I am using Neo4jClient and Neo4j graph database in C# and I am wondering how I can retrieve all nodes with Neo4jClient.
Here is the cypher query to retrieve all nodes which have a relationship to "KNOWS" independently of the relationship direction :
start n =node(*) match n-[r:KNOWS]-(friend) return friend;
And here is the C# code with Neo4jClient :
var client = new GraphClient(new Uri("http://localhost:7474/db/data"));
client.Connect();
var cypherFluentQueryReturned = client.RootNode
.StartCypher("n")
.Match("n-[:KNOWS]->friend")
.Return<Node<Person>>("friend");
However Neo4jClient doesn't allow to retrieve all nodes from * but only from a start point, here the root node.
How can I say with Neo4jClient to retrieve all nodes and not only nodes attached to root node?
It seems there is no way to query nodes from * through Neo4jClient.GraphClient.
However I can do that by executing a query with RawGraphClient :
CypherQuery query = new CypherQuery("start n=node(*) match n-[KNOWS]-(person) return person", new Dictionary<string, object>(), CypherResultMode.Set);
var persons = ((IRawGraphClient)client).ExecuteGetCypherResults<Person>(query).ToList();