The documentation for data-api-builder GraphQL aggregations contains examples that seem not to work. Neither with 1.x nor with 2.x versions of data-api-builder.
For example: This is the first query in the docs:
{
books(
groupBy: { fields: ["year"] }
) {
items {
year
}
aggregates {
pages {
sum
average
min
max
}
}
}
}
This query doesn't work. It returns an error saying that "groupBy" is not valid here.
But i found out that this works:
{
books {
groupBy(fields: [year]) {
fields {
year
}
aggregations {
sum(field: pages)
}
}
}
I learned about this query syntax in an example in the source code .
I tested with the Docker versions 1.7.93 and 2.0.8 of data-api-builder and got the same results on both versions.
Is there a mismatch between documentation and implementation? Or do i look at the wrong documentation?
The documentation for data-api-builder GraphQL aggregations contains examples that seem not to work. Neither with 1.x nor with 2.x versions of data-api-builder.
For example: This is the first query in the docs:
This query doesn't work. It returns an error saying that "groupBy" is not valid here.
But i found out that this works:
I learned about this query syntax in an example in the source code .
I tested with the Docker versions 1.7.93 and 2.0.8 of data-api-builder and got the same results on both versions.
Is there a mismatch between documentation and implementation? Or do i look at the wrong documentation?