Measures can have different dimensions depending on the statistic they appear in.
Example: BEVSTD
In statistic 12411 it has dimensions age group, gender and nationality
In statistic 32211 it doesn't have any dimensions.
This is a problem for the current design of the tree API, as the dimensions are 'hard-coded' as attributes of the measures. Corresponding graphql-query:
{
region(id: "01001") {
id
name
BEVSTD {
year
value
}
}
}
Depending on whether the user wants to query statistic 12411 or statistic 32211, BEVSTD should have a different set of subfields and arguments (which is not possible, as subfields and arguments of BEVSTD are defined statically in the schema).
We added the option to specify the source statistic like this:
{
region(id: "01001") {
id
name
BEVSTD(statistics: R12411) {
year
value
}
}
}
-> incorrect, missing dimension selection
or like this:
{
region(id: "01001") {
id
name
BEVSTD(statistics: R32211) {
year
value
}
}
}
Measures can have different dimensions depending on the statistic they appear in.
Example: BEVSTD
This is a problem for the current design of the tree API, as the dimensions are 'hard-coded' as attributes of the measures. Corresponding graphql-query:
Depending on whether the user wants to query statistic 12411 or statistic 32211, BEVSTD should have a different set of subfields and arguments (which is not possible, as subfields and arguments of BEVSTD are defined statically in the schema).
We added the option to specify the source statistic like this:
-> incorrect, missing dimension selection
or like this:
-> correct, no dimensions