Get Started
Fetching and Updating Your Schema
Your GraphQL schema can be fetched and updated using the /admin
endpoint of
your cluster. 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
.
This endpoint works in a similar way to the /admin endpoint of Dgraph, with the additional constraint of requiring authentication.
Fetching the current schema
It is possible to fetch your current schema using the getGQLSchema
query on
/admin
. Below is a sample GraphQL query which fetches this schema.
Setting a new schema
You can save a new schema using the updateGQLSchema
mutation on /admin
.
Below is an example GraphQL body, with a variable called sch
which must be
passed in as a variable