incubator-kie-kogito-apps
incubator-kie-kogito-apps copied to clipboard
totalCount is missing in GraphQL response
Describe the bug
Currently, it is possible to query the data using the Pagination schema. It provides
limit: int offset: int
However, it makes more sense when the caller knows the result count which satisfy the executed graphQl query.
Expected behavior
Response should contain the
totalCount
Actual behavior
No response
How to Reproduce?
No response
Output of uname -a
or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)
No response
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
No response
Hi @nmirasch, could you please evaluate this request?
@nmirasch any progress on this?
Hi @JudeNiroshan, we have been avoiding this total count queries regarding performance reasons. You can see the justification of this design here: https://github.com/apache/incubator-kie-kogito-apps/issues/1506#issuecomment-1324992472. To add this total count we need to explore what could be the best way to do that, GraphQL doesn't do this calculations and aggregations for you. One way would be to define a Type of aggregated data in Graphql and a function you want to implement to do the aggregation. For this reason we need to define what is exactly needed and define the specific solution for that purpose.