Add GraphQL Subscription to Admin queries. To have a way to watch changes made in the cluster and etc

Moved from GitHub dgraph/5006

Posted by MichelDiz:

Experience Report

What you wanted to do

As an administrator of Graph Database. I would like to have on hand, easy access to my cluster information dynamically. Than just running queries over and over. The subscription feature is more efficient for this.

The idea with this is to create a kind of “watcher” in Ratel (later after the implementation of the subs for admin). Where that instance subscribes for any change of administrative parameters or even background tasks.

e.g. Aman created a feature that does background indexing. Ratel is not able to keep up with this. But if we had a GQL Subs, it would be easy to implement a warning in the Ratel about the beginning and end of a bg index. As a form of logging and/or alerts.

It would even be possible to implement a small informal “log” system in the Ratel. Where when accessing the Ratel, the user (subscribes) sees the most recent activities of the Cluster. And you can leave the Ratel open to keep track of more logs (Maybe even append the logs to a file in Ratels container). This type of log exists by default in UIs of other DBs.

Why that wasn’t great, with examples

I can only generate mutation queries, I cannot query by the current parameters. I can’t keep track of tasks in the background except accessing the container and waiting for the logs to appear.

I’m adding to the Backlog. If this feature proves unnecessary, pls close this.

MichelDiz commented :

This could solve this issue too Show query progress, specifically for long running queries · Issue #3857 · dgraph-io/dgraph · GitHub

update 2020:

Some related topics.

Same issue as above but moved to discuss
Show query progress, specifically for long running queries

RFC about long running tasks

One more user ask a feature in the same topic