Closed alichherawalla closed 4 years ago
I haven't tried relay as yet so not sure of that implementation but happy to explore that in the future as well
Yeah if you make the pagination a choice I will accept it you don't have to implement the other options yet
I don't follow completely, currently, in the PR the pagination is optional.
Is there something else that i'm missing?
Can you make it as a command option and only generate if that option is provided so we can be backward compatible later when we add other pagination options.
Like this: --pagination=offset (your PR) --pagination=cursor --pagination=relay
Docs are here: https://github.com/urfave/cli/blob/master/docs/v2/manual.md
I see what you mean, updated with CLI support. Thanks!
Very nice! I always dit it the same way like this but are you open for cursor-based pagination this is much stronger as it works when someone is adding items to the list and you want the other batch and it misses some items.
But I will merge this if this option is optional we could later do cursor based pagination like this:
--pagination=offset (your PR) --pagination=cursor --pagination=relay
https://engineering.dubsmash.com/bi-directional-pagination-using-graphql-relay-b523c919c96