🎉 Hypermode Agents Beta: natural language agent creation, 2,000+ integrations, export to code Try Agents now! →
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 backend, and start fresh 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. Dropping data programmaticallyYou can drop data by invoking thedropData
mutation on /admin/slash
endpoint. As an example, if your GraphQL endpoint is https://<your-backend>/graphql
, then the admin endpoint for schema is at https://<your-backend>/admin/slash
. This endpoint requires authentication. Here is curl example.
curl 'https://<your-backend>/admin/slash' \
-H 'X-Auth-Token: <your-token>' \
-H 'Content-Type: application/graphql' \
--data-binary 'mutation { dropData(allData: true) { response { code message } } }'
If you would like to drop the schema along with the data, then you can set the allDataAndSchema
flag.
curl 'https://<your-backend>/admin/slash' \
-H 'X-Auth-Token: <your-token>' \
-H 'Content-Type: application/graphql' \
--data-binary 'mutation { dropData(allDataAndSchema: true) { response { code message } } }'
Self-managed Drop data and schemaThe /alter
endpoint is used to drop data. To drop all data and schema:
curl -X POST localhost:8080/alter -d '{"drop_all": true}'
To drop all data only (keep schema):
curl -X POST localhost:8080/alter -d '{"drop_op": "DATA"}'
The /alter
endpoint can also be used to drop a specific property or all nodes of a specific type. To drop property name
:
curl -X POST localhost:8080/alter -d '{"drop_attr": "name"}'
To drop the type Film
:
curl -X POST localhost:8080/alter -d '{"drop_op": "TYPE", "drop_value": "Film"}'
Responses are generated using AI and may contain mistakes.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4