Graph query language GO FROM: How to start from the last returned property?

30 Views Asked by At

Is there any way to implement GO FROM from the property returned by the previous query, specifically:

GO FROM "XXX" over web yield properties(edge).dst_url_vid as dst_url_vid
| GO FROM $-.dst_url_vid over sec_to_sens_type yield dst(edge)

The above statement is to start from a specific node, then get a property on the edge, and this is vid in the graph. The next step is to start from this vid and continue the query later.

1

There are 1 best solutions below

0
On

You can try this:

GO FROM ‘xxx’ over web yield web._dst AS id | go from $-.id over

Though this is from the destination of the web edge, since go statements do not support starting from a node's property, even if the property value is the same as the vid.