Facets reply field layout

Hi @noandrea,

I am not sure of the exact schema that you are using. It would be helpful if you could share that.

Consider the following mutation:

{
	set{
    _:a <name> "alice" .
    _:a <hasDevice> _:b (until=2010-01-02T15:04:05) .
    _:a <hasDevice> _:c (until=2020-01-02T15:04:05 ) .
    _:b <name> "iphone" .
    _:b <dgraph.type> "phone" .
    _:c <name> "samsung" .
    _:c <dgraph.type> "phone" .
  }
}

Consider the following query:

{
  q(func: eq(name, "alice")) {
    uid
    hasDevice @facets(until){
      uid
      name
    }
  }
}

The response is:

    "q": [
      {
        "uid": "0xa",
        "hasDevice": [
          {
            "uid": "0x9",
            "name": "samsung",
            "hasDevice|until": "2020-01-02T15:04:05Z"
          },
          {
            "uid": "0xb",
            "name": "iphone",
            "hasDevice|until": "2010-01-02T15:04:05Z"
          }
        ]
      }
    ]