How can i get a speical node with its all accessible nodes

You can run this to get two connected components. You can ignore the nodes with predicate gtype while processing the resulting nodes.

{
  node(func:eq(name, ["c","j"])) @recurse {
    uid
    guid_to{
    }
  }
}

image

2 Likes