Skip to content

expand(_all_) fails with facets #1650

@RafaARV

Description

@RafaARV

expand(all)@facets fails when a new attribute is set in a related node.
Version/Branch 0.8.3 working from web GUI.

Steps to reproduce:

SET SCHEMA:

mutation {
    schema {
        group: string @index(exact,term) .
        name: string @index(exact,term) .
        edge: uid @count .
        r_edge: uid @count .
        other: string @index(exact,term) .
    }
}

ADD ROOT NODE:

mutation {
  set {
    _:root <group> "test" .
    _:root <name> "root" .
    _:root <other> "root" .
  }
}

ADD FIRST NODES:

{
  root as var(func:eq(name, "root"))@filter(eq(group,"test") and eq(name,"root"))
}

mutation{
  set{
    uid(root) <link> _:nodo .
    _:nodo <name> "nodo1" .
    _:nodo <group> "test" .
  }
}
{
  root as var(func:eq(name, "root"))@filter(eq(group,"test") and eq(name,"root"))
}

mutation{
  set{
    uid(root) <link> _:nodo .
    _:nodo <name> "nodo2" .
    _:nodo <group> "test" .
  }
}
{
  root as var(func:eq(name, "root"))@filter(eq(group,"test") and eq(name,"root"))
}

mutation{
  set{
    uid(root) <link> _:nodo .
    _:nodo <name> "nodo3" .
    _:nodo <group> "test" .
  }
}

ADD NODES WITH FACETS:

{
  root as var(func:eq(name, "nodo2"))@filter(eq(group,"test") and eq(name,"nodo2"))
}

mutation{
  set{
    uid(root) <link> _:nodo (facet_test = "2-2_1", facet_test2 = 21, facet_test3 = true).
    _:nodo <name> "nodo2_1" .
    _:nodo <group> "test" .
  }
}
{
  root as var(func:eq(name, "nodo2"))@filter(eq(group,"test") and eq(name,"nodo2"))
}

mutation{
  set{
    uid(root) <link> _:nodo (facet_test = "2-2_2", facet_test2 = 22, facet_test3 = true).
    _:nodo <name> "nodo2_2" .
    _:nodo <group> "test" .
  }
}

QUERY ALL GROUP "TEST" NODES WORKS:

{
    nodes as var(func:eq(group, "test"))

    full_graph(func:uid(nodes)) {
        _uid_
        expand(_all_)@facets{
            _uid_
        }
    }
}

SET A NEW ATTRIBUTE:

{
  root as var(func:eq(name, "nodo2"))@filter(eq(group,"test") and eq(name,"nodo2"))
}

mutation{
  set{
    uid(root) <other> "other_val".
  }
}

QUERY ALL GROUP "TEST" NODES FAILS!!!:

{
    nodes as var(func:eq(group, "test"))

    full_graph(func:uid(nodes)) {
        _uid_
        expand(_all_)@facets{
            _uid_
        }
    }
}

Error in GUI: NetworkError when attempting to fetch resource.: Could not connect to the server
JSON is empty.

Metadata

Metadata

Assignees

Labels

kind/bugSomething is broken.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions