Using 'GRAPH_TRAVERSAL_TREE' in my AQL only returns the vertices, is there away of returning the edge documents together with the vertices. Example:
FOR item in GRAPH_TRAVERSAL_TREE('graph','_id','outbound','items')
Return item
Returns something like:
[
{vertex},
items:[
{vertex, items:[]},
{vertex, items:[]},
]
]
I would like the edge information to be included in the result as below
[
{vertex},
items:[
{edge:{edge}, vertex:{vertex}, items:[]},
{edge:{edge}, vertex:{vertex}, items:[]},
]
]
Using AQL without graph functions I have this:
for item in items filter item._id == 'items/212612934312'
return {'head': item, 'items': [(
for edge in itemEdges filter edge._from == item._id
for vertex in items filter vertex._id == edge._to
return {'edge': edge, 'vertex': vertex}
)]}
But I am sure there should be a better way?