OrientDB Studio and pyorient gives different results for same command


#1

I have a small graph (as shown in the above image). When I run the following query :

traverse outE(‘has_component’).inV()
from
(select expand(rid) from index:part.part_id where key = ‘A’)
maxdepth 2 strategy breadth_first

in OrientDB studio I get the desired result, which is basically all the vertices in the image.

But when I execute the following using pyorient :

cmd = “”"
traverse outE(‘has_component’).inV()
from
(select expand(rid) from index:part.part_id where key = ‘A’)
maxdepth 2 strategy breadth_first
“”"

r = client.query(cmd, -1)

I get only the first vertex (i.e ‘A’) back. I think it does not traverse the graph at all. How do I traverse the graph using outE().inV() in pyorient?

(I want to later add conditions on the edge properties for traversal like outE()[].inV(), which is why I am not using out() )