Skip to content

[BUG]: expand(_all_) @filter(type(X)) does not work on reverse relationships #8558

@rderbier

Description

@rderbier

What version of Dgraph are you using?

22.0.1

Tell us a little more about your go-environment?

No response

Have you tried reproducing the issue with the latest release?

None

What is the hardware spec (RAM, CPU, OS)?

What steps will reproduce the bug?

Postman repro case https://cloudy-astronaut-679688.postman.co/workspace/e8602b95-3843-46e0-8f3b-2d994602fa7a/collection/24547389-2ebb8f27-7be7-4493-a152-dca9b4782b5b?action=share&creator=24547389

Expected behavior and actual result.

https://dgraph.io/docs/query-language/expand-predicates/#filtering-during-expand expand supports type filters.

using predicate "in" with @reverse.
you can declare the predicate "~in" in a type.
expand(all) will work : it will follow all the relationships declared in the node type, so it will follow ~in if present.
in our case the ~in relationship goes to a node of type "N5803".
If we expand(all) @filter(type(N5803)) , the query does not follow the ~in relationship. See the postman test with other options working.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalearea/querylangIssues related to the query language specification and implementation.dgraphIssue or PR created by an internal Dgraph contributor.kind/bugSomething is broken.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions