How to delete all child nodes when parent node deleted using the gremlin query?

Viewed 1434

I have a requirement to drop all child nodes when parent node is dropping using gremlin query.

suppose

                               A
                             /   \
                            B     C
                           /  \     
                          D    E 
                        /   \
                       F     G
                            /  \
                           H    I

If we want to drop 'B' vertex then its childs 'D','E','F','G','H' &'I'vertex also should be drop. Could you please tell me how to drop.

1 Answers
Related