Facet variables don't scope correctly

ppp225 commented :

Indeed, it looks like the underlying cause is the same as 4160. Feel free to close this in this case.

Regarding 4907: previously, the facet response for a query like this:

carStat @facets(statValue: statValue) {
    	carName
}

Would be:

carStat": [
{
  "carName": "Porsche",
  "statValue": 0.7
}
]

Currently it is:

carStat": [
  {
    "carName": "Porsche",
  }
],
"statValue": {
  "0": 0.7
},

But one could use a query like this:

carStat @facets(SV as statValue) {
    	carName
        statValue: val(SV)
    }

To get:

carStat": [
  {
    "carName": "Porsche",
    "statValue": 0.7,
  }
],
"carStat|statValue": {
  "0": 0.7
},

That’s why I said, it could be used as a workaround.