0

According to the Neo4j data visualisation guide there is a possibility to set the parameter resultDataContents to "graph". ( https://neo4j.com/developer/guide-data-visualization/ Neo4j documentation for "resultDataContents")

This is exactly what I need for my application. Any idea how to do that with graphaware/neo4j-php-client, since I am not able to find it in documentation?

neo
  • 89
  • 4
  • 11
  • Hi so how did you solved this problem finally? hack to send the 'graph' mode or did it on client side? by default it returned the 'rest' format json which really hard to transform to "graph" format on client's hand. – Liping Huang Oct 10 '17 at 08:07

1 Answers1

1

You can't. This format has been removed in v4 of the client due to its verbosity making the json body too large.

Also, chances are high that in v5 http will be removed from the client and focus on bolt only.

You can still issue cypher statements using pure curl or an abstraction layer as Guzzle. Or you can also create a wrapper that will create a graph representation based on the Result received from a Cypher query.

Christophe Willemsen
  • 19,399
  • 2
  • 29
  • 36
  • Thanks, anyways I was able to implement it to use graph with workaround edits in Session.php and ResponseFormatter.php. I think graphaware should give this as optional parameter and programmers can decide if they need graph format or rest, considering any size consequences. – neo May 13 '17 at 09:19
  • It was in the v3 of the client, however in v4 the API has been aligned to the neo4j official drivers. As I said, in v5 http will be removed so "graph" format will not be available at all because it doesn't exist in Bolt. – Christophe Willemsen May 13 '17 at 11:48
  • @ChristopheWillemsen the **graph** mode really useful for client use for the visualization. By default it will return the *rest* format json by the OGM API, so how to format it to **graph** format on client side? – Liping Huang Oct 10 '17 at 07:59
  • As I told, it has been removed. You can easily create a layer that will transform a result to a graph json format. – Christophe Willemsen Oct 10 '17 at 12:22