To make yet another d3 viewer, I'd like to get a graph out from a rest query.
In my understanding, stating 'resultDataContent':['graph'] would return a graph. Instead, it return a list of subgraphs and I need therefore to collect and distinct the nodes. Is there a way to get the full sub graph simply?
For example, I put these 4 nodes
CREATE (a:Person {name:'a'}) CREATE (b:Person {name:'b'}) CREATE (c:Person {name:'c'}) CREATE (d:Person {name:'d'}) CREATE (a)-[:KNOWS]->(b) CREATE (a)-[:KNOWS]->(c) CREATE (b)-[:KNOWS]->(c) CREATE (c)-[:KNOWS]->(d) But calling a POST query with the following query will return 2 results.data, each of them with a "graph", consisting of 2 nodes and a links?
{"statements":[ { "statement":"MATCH (p:Person {name:{pName}})-[l:KNOWS]-(q:Person) RETURN p,l,q", "parameters":{"pName":"a"}, "resultDataContents":["graph"] } ]} Is there a way to return the one subgraph, without the need to reassemble the results?
Thanks for the help, Alex