-
Notifications
You must be signed in to change notification settings - Fork 4
Quickstart
MichaelJCompton edited this page Apr 15, 2019
·
2 revisions
It takes just one GraphQL mutation to spin up a Dgraph instance.
E.G, if you know the id of your environment, the GraphQL mutation
mutation addDgraphInstance($dgInput: DgraphInstanceInput!) {
addDgraphInstance(inputData: $dgInput) {
id
}
}
with some input data about the instance you want
{
"dgInput": {
"replicas": 1,
"shards": 1,
"storageGB": 3,
"env": {
"id": "0x7"
}
}
}
spins you up a Dgraph instance. Once the instance is up, you can get its details and credentials via
query getDgraphInstance($dgInput: ID!) {
getDgraphInstance(id: $dgInput) {
dgraphId
address
certificates {
caCert
clientCert
clientKey
}
}
}
After that, it's connecting the instance via secured grpc and you are on your way.
Just
mutation deleteDgraphInstance($instance: ID!) {
deleteDgraphInstance(inputData: $instance)
}
and it's gone.