Skip to content

Repository files navigation

dgraph-admin

$ dgraph-admin help
Usage: dgraph-admin [--url <url>] [--auth <auth>] <command> [<args>]
dgraph-admin is a simple tool for managing dgraph.
Options:
--url dgraph url
--auth auth header to include with the request
Commands:
update-schema add or modify schema
get-schema get the current schema
drop-all drop all data and schema
drop-data drop all data only (keep schema)
get-health get status of nodes

usage

dgraph-admin can be used to manage dgraph that is running locally as well as in dgraph cloud

locally

if dgraph is available on default url (localhost:8080) and token is not set:

$ dgraph-admin get-health

if token was provided in dgraph's --security flag (see dgraph cli ref):

$ dgraph-admin --auth X-Dgraph-AuthToken:token get-health

with dgraph cloud

to be able to use it with dgraph cloud you will need to create an admin api key (see authentication)

$ dgraph-admin --url https://something.cloud.dgraph.io --auth Dg-Auth:key get-health

installation

you will need rust and cargo

$ git clone https://github.com/blukai/dgraph-admin.git
$ cd dgraph-admin
$ cargo install --path .

a piece of motivation

during development (other project) i found an often need to modify schema or drop all data. while it is possible without this tool, it is not as convenient, easy and fast.

also i wanted to write something useful in rust xd.

About

a simple tool for managing dgraph

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages