When getting started with Dgraph I’ve been trying to use the Python client in order to alter the db schema. However when trying to use the DQL language shown in the docs the syntax is not accepted. It seems only GraphQL syntax is accepted.
This syntax does not work
type Person {
name: String! @search(by: exact)
friends: [Person]
}
This syntax does
name: string @index(exact) .
friends: [uid] .
type Person {
name
friends
}
Can anybody confirm that this is the case? Are they planning on changing this? Or is it possible I’m using it wrong?
I followed the little documentation on the Python client, but it’s not very informative and the part with the schema alteration in the examples is too trivial to be of help.
This syntax is GraphQL not DQL. GraphQL just works in GraphQL applications and libs. Like Apollo GraphQL and others. You won’t use GraphQL in Dgraph’s clients.
For sure there is some popular GraphQL client for Py.