Ability to "collapse" expanded nodes from UI through dgraph-ratel

Moved from GitHub ratel/50

Posted by insanitybit:

Experience Report

Note: Feature requests are judged based on user experience and modeled on Go Experience Reports. These reports should focus on the problems: they should not focus on and need not propose solutions.

What you wanted to do

In dgraph-ratel the “expand” button is extremely helpful. I generally start off with a simple query and expand from there. One issue I have is that when I perform a query (especially recursive queries) the fanout can be quite large. I’d like to have a “remove” button that lets me click a node and remove it, and subsequently removes all nodes that are no longer reachable from a forward edge (that were previously reachable).

Essentially, given a graph with:
A, B, D, C

A->B
A->C
B->C
B->D

If I click “remove” on “B” it will also remove “D” as it is no longer reachable.

What you actually did

Right now I don’t have a good solution to this. Huge fanout can really bog my browser down and I end up having to create smaller queries and manually expand out with the “expand” button.

Why that wasn’t great, with examples

I model process trees in dgraph. Fanout is generally small, but once in a while a process will have massive fanout (like a background process). I’d like to be able to selectively prune out those processes without having to make overly complex queries.

Any external references to support your case

danielmai commented :

Would you like to delete these nodes from Dgraph? Or only from the graph visualization in Ratel?

insanitybit commented :

Just from the visualization - similar to how the “expand” just modifies the visualization.

danielmai commented :

Thanks for clarifying. I’ll move this issue over to the Ratel repo.

paulftw commented :

Added in 55bb88693f8cd244f90b78da89138fca30a573c5