datenguide / datenguide-api

datenguide GraphQL API Server
MIT License
10 stars 2 forks source link

Duplicates in response for certain measures (Regionalatlas) #215

Open sjockers opened 4 years ago

sjockers commented 4 years ago

Certain queries, particularly for "Regionalatlas" statistics, respond with duplicate data.

Example query:

query {
  region (id: "06") {
    name
    AI0803 (year: 2009){
      id
      year
      value
      source{
        title_de
        periodicity
        valid_from
        url
        name
      }
    }
  }
}

Example response:

{
  "data": {
    "region": {
      "name": "Hessen",
      "AI0803": [
        {
          "id": "769b3e1f583304747e80ed57fe4585fcd23c0640",
          "year": 2009,
          "value": 6.7,
          "source": {
            "title_de": "Regionalatlas Deutschland",
            "periodicity": "JAEHRLICH",
            "valid_from": "1995-01-01T00:00:00",
            "url": null,
            "name": "99910"
          }
        },
        {
          "id": "0aecc948d67502120eef510a30db600522a30c35",
          "year": 2009,
          "value": 6.7,
          "source": {
            "title_de": "Regionalatlas Deutschland",
            "periodicity": "JAEHRLICH",
            "valid_from": "1995-01-01T00:00:00",
            "url": null,
            "name": "99910"
          }
        }
      ]
    }
  }
}

Expected behavior: The value should only appear once.

dpprdan commented 4 years ago

Probably related to https://github.com/datenguide/genesapi-tabular/issues/8