Skip to content

Add support for filtering on value predicate facets #4034

@robsws

Description

@robsws

I want to be able to filter value predicates on their facets as well as uid predicates. For example, I want to be able to execute something like the following query on the toy graph specified in the facets documentation:

curl -H "Content-Type: application/graphql+-" localhost:8080/query -XPOST -d '
{
  data(func: eq(name, "Alice")) {
     name
     mobile
     car @facets(gt(since, "2019-01-01"))
  }
}' | python -m json.tool | less

Running that query right now provides the following error response:

{
  "errors": [
    {
      "message": ": Facet filtering is not supported on values.",
      "extensions": {
        "code": "ErrorInvalidRequest"
      }
    }
  ],
  "data": null
}

Metadata

Metadata

Assignees

Labels

area/facetsIssues related to face handling, querying, etc.area/querylangIssues related to the query language specification and implementation.area/querylang/filterRelated to the filter directive.kind/enhancementSomething could be better.priority/P2Somehow important but would not block a release.status/acceptedWe accept to investigate/work on it.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions