I’m new to dgraph (and even GraphQL, in practice/project work), so I rely on good tutorials (check:) and proper error reporting with informative messages and useful suggestions.
When designing my first real GraphQL schema the other day and trying to upload that to dgraph, it took me longer than I dare to admit to find out that I was posting to the wrong endpoint (using the DGraph Java client, going against the DQL endpoint, instead of the
/graphql endpoint by hand).
The error “missing colon” was not really helpful at all - this could have been solved a lot faster with a proper error message like “not valid DQL” or even “GraphQL schema detected, please use /graphql endpoint” or similar.
Even better would be direct support in handling GraphQL schemas using the Dgraph client, so I don’t have to POST it by hand (e.g. using Spring Web’s RestTemplate).
What do you think could be done to reduce the confusion about DQL/GraphQL a bit here?
For my use case, plain old GraphQL would be fine, although I might have to switch to get advanced features like
@auth support in the end.