cli / go-gh

A Go module for interacting with gh and the GitHub API from the command line.
https://pkg.go.dev/github.com/cli/go-gh/v2
MIT License
322 stars 45 forks source link

Allow RESTClient and GQLClient to support automatic pagination #23

Open samcoe opened 2 years ago

samcoe commented 2 years ago

Pagination is currently not possible using RESTClient and takes lots of manual work using GQLClient. We should support this feature for both. Initial implementation idea is to add a pagination options to ClientOptions which would enable this for both clients and be a noop for the HTTPClient.

heaths commented 2 years ago

Similar to cli/cli#1268. Perhaps there's a common solution for both. What @mislav suggested is a good idea. I would think with REST an array could simply be amended with subsequent elements. GraphQL might be more tricky.