Dropping Data from your Backend
We’re overhauling Dgraph’s docs to make them clearer and more approachable. If you notice any issues during this transition or have suggestions, please let us know.
It is possible to drop all data from your Dgraph Cloud backend, and start afresh while retaining the same endpoint. Be careful, as this operation isn’t reversible, and all data is lost. It is highly recommended that you export your data before you drop your data.
In order to drop all data while retaining the schema, click Drop Data
under
the Schema tab in the sidebar.
Dropping data programmatically
In order to do this, call the dropData
mutation on /admin/slash
. As an
example, if your GraphQL endpoint is
https://frozen-mango.us-west-2.aws.cloud.dgraph.io/graphql
, then the admin
endpoint for schema is at
https://frozen-mango.us-west-2.aws.cloud.dgraph.io/admin/slash
.
Please note that this endpoint requires Authentication.
Please see the following curl as an example.
If you would like to drop the schema along with the data, then you can set the
allDataAndSchema
flag.
Was this page helpful?