Check https://github.com/dgraph-io/dgraph/tree/pawanrawal/custom-logic
it’s pretty new and it is not implemented yet.
The branch was deleted. Due merge works. In my last comment on this topic I show a way to “dig” latest work on it.
Not sure, but I guess it will be. You could potentially use the HTTP API to do graphql+- queries.
It is not clear if you are asking about Dgraph or Dgraph’s GraphQL. I gonna assume that your questions are related to GraphQL tho.
Well, Dgraph’s GraphQL has automatic “CRUD” queries and mutations based on your GraphQL Schema (I mean, the Schema GraphQL with Dgraph params on it).
PS. Dgraph itself doesn’t have “automatic CRUD”. In fact, nothing is automatic in Dgraph (only the background features of course). You have to define everything according to your data model. And learn the query language (of course).
There’s no such feature. Maybe, after April, we gonna have some engineers working on custom graphql +- queries defined in the Schema itself. Which means “Fixed queries”. Let’s put a BIG maybe here.
The GraphQL feature does this. You have to provide a GraphQL schema with Dgraph’s params. But it is not so “wise” it is a “CRUD” pattern. Check these docs https://graphql.dgraph.io/docs/
You will still have to deal with your business logic, as each case is different.
I’m not a Go dev, but I guess that yes, there is a way via Query. See Query Language - Query language
But is this a GraphQL question or Dgraph question? Graphql has its own way of doing this, it has built-in documentation out of the box.
This feels like a Dgraph question. Can you confirm this?
Another question, have you used Dgraph or Dgraph’s GraphQL before?
If your question is related to Dgraph the answer is one, if it is to GraphQL it is another similar answer. But technically in both cases the query is similar to the pseudocode that you shared.
Cheers.