https://${DEPLOYMENT_URL}/admin
{
getGQLSchema {
schema
generatedSchema
}
}
#!/usr/bin/env bash
DEPLOYMENT_URL="polished-violet.us-east-1.aws.cloud.dgraph.io"
DEPLOYMENT_JWT="<deployment-jwt>"
curl "https://${DEPLOYMENT_URL}/admin" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${DEPLOYMENT_JWT}" \
--data-binary '{"query":"{\n getGQLSchema {\n schema\n generatedSchema\n }\n}","variables":{}}' \
--compressed
https://${DEPLOYMENT_URL}/admin
mutation ($schema: String!) {
updateGQLSchema(input: { set: { schema: $schema } }) {
gqlSchema {
schema
}
}
}
schema
: your desired schema string in GraphQL format#!/usr/bin/env bash
DEPLOYMENT_URL="polished-violet.us-east-1.aws.cloud.dgraph.io"
DEPLOYMENT_JWT="<deployment-jwt>"
curl "https://${DEPLOYMENT_URL}/admin" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${DEPLOYMENT_JWT}" \
--data-binary '{"query":"mutation($sch: String!) {\n updateGQLSchema(input: { set: { schema: $sch } })\n {\n gqlSchema {\n schema\n }\n }\n}","variables":{"sch": "type Person { name: String! }"}}' \
--compressed