Declarative GraphQL, but for my needs I need imperative code logic
What you wanted to do
Is it possible to implement custom “digging” function for Dgraph ?
I mean for my needs I have to write a custom function for BFS traversal of graph, it should decide what type of nodes it should dig into, on edge attributes, how many layers, etc.
It will be good to have plugin interface in Go to write functions like that.
Thank you. loop:500 does not work here - that is just start point where I check for work time limit.
I am really doubt it is possible to describe logic like that (with dynamic conditions) in Recurse Query
I my real business logic case that function look much complex.
{
var(func: type(Human)){
u as uid
v as graph(
pagerank(
edges:[follow]
))
}
q(func: uid(u)){
uid
val(v)
}
}
In the part v as graph( pagerank( edges:[follow] )) ,it’s a go plugin add to dgraph alpha.
It need modify the source of dgraph gql parser, and develop your own algo plugin.