How can I DROP ALL on a Shared Cluster backend

I have recently found the tab in Ratel which should allow me to drop all data. Unfortunately, I get the error

Could not drop all: rpc error: code = PermissionDenied desc = Drop all can only be called by the guardian of the galaxy. Only guardian of galaxy is allowed to do this operation

So how can I become guardian of the galaxy for a backend on my Shared Cluster? I thought that ACL can only be used on Dedicated Clusters?

This would be a great feature, so I don’t have to select every single type and every single field manually if I want to start with a completely fresh schema.

You don’t. That would drop all data for every shared instance in your cluster.

That is correct. The shared plans on Dgraph Cloud uses dedicated clusters managed by Dgraph and namespace multiple clients where individual clients are locked into their namespace

So if that is the case, I assume that the user which is registered with my Shared Cluster instance, is an admin user for the specific namespace - my backend. I am allowed to manually delete every single predicate by hand, so why am I not allowed to delete all with one click?

Because the drop all functionality as originally designed does not respect namespaces, hence it is blocked from non groot users

Weird but OK!


You can kind of create your own drop all. Just use Bulk Upsert Delete. But it would be something manual in a way.

Oh! Never thought about that! How would I type out such an upsert?

It is a custom thing based on you schema modeling. You would use Recurse Query to catch all nodes end then delete.

But you would have to clean the schema manually.

1 Like

@MichelDiz thanks! :pray:

I have also been trying to do this searching for answers for a long time.
New here just trying to deleteAll data and schema in the Cloud shared instance.

Given such a common operation, can we have better documentation and example please. I find it quite confusing with some documents refering to “you can do this” and some articles “you can’t do this” on Cloud. For paid customers, it think there should be much better updated Cloud related documentations and making it clear what can be done on shared vs dedicated.

Please, open an issue here for this GitHub - dgraph-io/dgraph-docs: A native GraphQL Database with a graph backend