interledger / open-payments

Protocol to setup payments between entities on the Web based on GNAP
https://openpayments.dev
Apache License 2.0
202 stars 34 forks source link

Support pagination with `after` and `before` both specified #233

Open wilsonianb opened 2 years ago

wilsonianb commented 2 years ago

The relay pagination spec supports both after and before being specified together: https://relay.dev/graphql/connections.htm#sec-Pagination-algorithm

Rafiki currently ignores before if after is specified https://github.com/interledger/rafiki/blob/3d30ce755b4218a777ec77f408be5d15dfa0e687/packages/backend/src/shared/baseModel.ts#L64-L74

wilsonianb commented 2 years ago

Should Open Payments list endpoint query parameters then support after/before instead of just cursor? https://github.com/interledger/rafiki/blob/3d30ce755b4218a777ec77f408be5d15dfa0e687/packages/backend/src/shared/pagination.ts#L9-L20