fuel-core icon indicating copy to clipboard operation
fuel-core copied to clipboard

Refactor all graphql pagination using iter_all into common code

Open Voxelot opened this issue 2 years ago • 1 comments

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.

Voxelot avatar Jun 02 '22 20:06 Voxelot

Should also note that these tests should utilize the new rstest which is currently(?) used on the contract.rs test

ControlCplusControlV avatar Jun 02 '22 20:06 ControlCplusControlV

Fixed in the https://github.com/FuelLabs/fuel-core/pull/834

xgreenx avatar Jan 31 '23 18:01 xgreenx