fuel-core
fuel-core copied to clipboard
Refactor all graphql pagination using iter_all into common code
Currently each paginated api which uses the database iter_all is reimplementing lots of similar pieces of code. This make consistency in pagination behavior inconsistent, and harder to test.
The interface should accept all the common pagination params (first, last, before, after), the database column to iterator over, and accept a closure to map db results into grapqhl schema types.
Should also note that these tests should utilize the new rstest which is currently(?) used on the contract.rs
test
Fixed in the https://github.com/FuelLabs/fuel-core/pull/834