incubator-kie-kogito-apps icon indicating copy to clipboard operation
incubator-kie-kogito-apps copied to clipboard

totalCount is missing in GraphQL response

Open JudeNiroshan opened this issue 1 year ago • 3 comments

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

JudeNiroshan avatar Mar 06 '24 15:03 JudeNiroshan

Hi @nmirasch, could you please evaluate this request?

caponetto avatar Mar 06 '24 15:03 caponetto

@nmirasch any progress on this?

JudeNiroshan avatar Mar 20 '24 14:03 JudeNiroshan

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.

nmirasch avatar Mar 21 '24 17:03 nmirasch