How to get subgraph where the node is located?

Hi,
My graph like this:


now i want to filter out two nodes ( #70:0 and #72:0 ) and their subtree ,like this:

Supplementary explanation:
The class name of #34:2 is ‘Class_A’.
The class name of #65:0 , #70:0 , #72:0 is ‘Class_B’.
And Class_B has one property PROP1
#65:0.PROP1 = 1;
#70:0.PROP1 = 2;
#72:0.PROP1 = 3;

I tried to do this:

MATCH {class:Class_A,where:(@rid = #34:2)}
    .( bothE(){} .bothV(){ while:( PROP1 > 1 ) } )
{while:( $depth <2 ) } RETURN $pathelements

but it doesn’t work.

How can I write a query with a MATCH ?

Regards

Hi,
do you have to filter by PROPR1 > 1 or is even by @rid is fine?

Thanks

Regards,
Michela

Hi , thanks for your reply.
I am sorry that I did not describe clearly.
I just want to filter by PROPR1 > 1 .not by @rid .

Thanks

Regards

Hi,
try this:

MATCH {class:Class_A, as: class_a, WHERE: (@rid = #34:2)}.in(){AS:class_b}.out(){AS:class_c, WHERE:(PROP1 <= 1)} RETURN class_a, class_b, class_c

Hope it helps

Regards,
Michela