Fail when alter Schema

I think the problem here is that Dgraph has two types of schema, GraphQL and DQL (i.e. native). Your working example at the end is a DQL schema that can be uploaded with dgo client (dgo exclusively uses the DQL language). The failing examples you are trying above are GraphQL schemas, which must instead be sent via a http request or via the dgraph cloud UI. Would be cool if the dgo client had this ability, but currently it does not.

Both schemas can work together on the same underlying data if needed https://dgraph.io/docs/graphql/dgraph/

2 Likes