yahoo / elide

Elide is a Java library that lets you stand up a GraphQL/JSON-API web service with minimal effort.
https://elide.io
Other
1k stars 228 forks source link

Fix pagination set page totals to zero after non-zero query #3258

Closed kevinhinterlong closed 3 months ago

kevinhinterlong commented 4 months ago

Resolves #3257

Description

Fixes a bug where page totals were not being set for empty collections

Motivation and Context

This was usually correct, but if the page totals had been previously set - the pagination object seemed to be reused when querying graphql relationships with pageInfo - they would not be correctly reset for the next entity

How Has This Been Tested?

Added unit test to verify

License

I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.