[[rest-api-testdatacolumnorder]]
=== TestDataColumnOrder ===



[source,cypher]
----
START x  = node(26)
MATCH x -[r]-> n
RETURN type(r), n.name?, n.age?
----


.Final Graph
["dot", "Final-Graph-testDataColumnOrder.svg", "neoviz"]
----
  N24 [
    label = "{Node\[24\]|name = \'you\'\l}"
  ]
  N25 [
    label = "{Node\[25\]|age = 25\lname = \'him\'\l}"
  ]
  N26 [
    label = "{Node\[26\]|name = \'I\'\l}"
  ]
  N26 -> N25 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "know\n"
  ]
  N26 -> N24 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "know\n"
  ]
----

_Example request_

* *+POST+*  +http://localhost:7474/db/data/cypher+
* *+Accept:+* +application/json+
* *+Content-Type:+* +application/json+
[source,javascript]
----
{"query": "start x  = node(26) match x -[r]-> n return type(r), n.name?, n.age?","params": {}},
----


_Example response_

* *+200:+* +OK+
* *+Content-Type:+* +application/json+
[source,javascript]
----
{
  "columns" : [ "type(r)", "n.name?", "n.age?" ],
  "data" : [ [ "know", "him", 25 ], [ "know", "you", null ] ]
}
----


