I have this schema:
mutation {
schema {
graph: string @index(exact,term) .
dummy_param: string @index(exact,term) .
edge: uid @count .
name: string @index(exact,term) .
}
}
Then I create a root node:
mutation {
set {
_:root <graph> "graph1" .
_:root <entry_point> "graph1" .
_:root <name> "root" .
}
}
Then I try to add a node to the root node by running:
{
root as var(func:eq(name, "root"))@filter(eq(graph, "graph1")) {}
}
mutation {
set {
uid(root) <edge> _:node .
_:node <name> "node1" .
_:node <graph> "graph1" .
}
}
But if I query like this:
{
recurse(func:eq(name, "root")){
name
graph
edge
}
}
I get what I put as “first” in the attached image.
Shouldn’t the result be more like what I put as “second” in the attached image?