Switching Schema Modes
Dgraph Cloud supports three different schema modes, which control how the underlying Dgraph instance is configured. Each mode is pre-configured keeping ease of use in mind:
- Read-Only mode, where no schema changes or mutations are allowed.
- Strict mode, only allowing mutations on predicates that are already present in the schema.
- Flexible mode removes any restriction on schemas and mutations, and provides access to advanced Dgraph features.
In read-only mode, all mutations and attempts to alter the Cloud schema are blocked. You can still access your data through read-only queries.
Strict mode is the default setting on Dgraph Cloud. In this mode, Dgraph Cloud will enforce a strict schema, only allowing mutations on predicates already present in the schema.
You can use GraphQL and DQL (formerly GraphQL+-) queries and mutations in this mode, as described in the advanced queries section. However, all queries and mutations must be valid for the applied schema.
alteroperation with that predicate and its schema type.
Flexible mode is suitable for users who are already familiar with Dgraph. Flexible mode removes any
restrictions on schemas and mutations, and also provides access to
advanced Dgraph features like directly altering the schema with the
HTTP and GRPC endpoints.
Running your backend in flexible mode is also a requirement for upcoming features such as support for access control lists (ACL).
Changing your Schema Mode
To change your schema mode, go to the settings page, click the Advanced tab, and then select a mode from the Schema Mode list box.