Closed gschurck closed 2 years ago
Hello, there is no built-in support for this.
If you need help implementing this, I'm happy to continue the conversation on Discord: https://neo4j.com/developer/discord/.
Once you get a Result
or ResultWithContext
, you'll need to call, in order:
Keys
Next
+Record
or NextRecord
) or just Collect
Record
or NextRecord
, call and act upon the result of Err
at the end of the iterationConsume
Okay thank you.
Finally, I found that it's possible to export the graph data as JSON with cypher query directly
CALL apoc.export.json.all(null,{useTypes:true, stream: true, jsonFormat: "JSON"})
YIELD data
RETURN data
So it seems that it's the optimal way for an API to get neo4j graph data as JSON and return it directly in response.
Is it possible to get the result of a cypher query in graph format directly, like in the HTTP API ? For example to return the graph directly from the backend to display a graph visualization on the frontend.