to get a personalized navigation.
to get a personalized navigation.
Hey,
I'm fetching some aggregated data, but according to the docs the _aggretate-nodes are deprecated and will be removed. The data I'm fetching does not use groupBy, and thus the new method throws an error.
Would simplify things if the new approach worked without grouping.
Works like a charm
query AggregatedOrderSummary($cid: Int!, $dateStart: Int!, $dateEnd: Int!) {
useCompany(no: $cid) {
order_aggregate(
filter: {_and: [{orderDate: {_gte: $dateStart}}, {orderDate: {_lte: $dateEnd}}, {customerNo: {_gt: 0}}]}
) {
count {
orders: orderNo
}
}
}
}
{
"data": {
"useCompany": {
"order_aggregate": {
"count": {
"orders": 232
}
}
}
},
"extensions": {
"vbnxt-trace-id": "0000000000000000ac82fe3b47675fee"
}
}
Not working
query AggregatedOrderSummary($cid: Int!, $dateStart: Int!, $dateEnd: Int!) {
useCompany(no: $cid) {
order(
filter: {_and: [{orderDate: {_gte: $dateStart}}, {orderDate: {_lte: $dateEnd}}, {customerNo: {_gt: 0}}]}
) {
items {
aggregates {
count {
orders: orderNo
}
}
}
}
}
}
{
"errors": [
{
"message": "Error: SQL command no. 3010 failed.Database error.",
"extensions": {
"data": {
"status": 2,
"status_name": "DatabaseError"
}
}
}
],
"data": {
"useCompany": {
"order": {
"items": null
}
}
},
"extensions": {
"vbnxt-trace-id": "000000000000000075873a15a5b0ddac"
}
}
This problem is now fixed. https://docs.business.visma.net/docs/releasenotes
When will the old way of doing aggregate be removed ?
Thanks for reporting it. I will investigate the problem.
Copyright © 2022 Visma.com. All rights reserved.