Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

totalCount is missing in GraphQL response #2012

Open
JudeNiroshan opened this issue Mar 6, 2024 · 3 comments
Open

totalCount is missing in GraphQL response #2012

JudeNiroshan opened this issue Mar 6, 2024 · 3 comments

Comments

@JudeNiroshan
Copy link

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

@caponetto
Copy link

Hi @nmirasch, could you please evaluate this request?

@JudeNiroshan
Copy link
Author

@nmirasch any progress on this?

@nmirasch
Copy link
Contributor

Hi @JudeNiroshan, we have been avoiding this total count queries regarding performance reasons. You can see the justification of this design here: #1506 (comment). 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants