-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow RESTClient and GQLClient to support automatic pagination #23
Labels
enhancement
New feature or request
Comments
nicokosi
added a commit
to nicokosi/gh-collab-scanner
that referenced
this issue
Mar 14, 2022
Current page can be set via a new '--page' flag (default: 1): $ gh collab-scanner --org softwarevidal --page 2 $ gh collab-scanner --user nicokosi --page 2 Page size is hard-coded to 100. PS: - I could not retrieve pagination info (page x on y) because of this limitation 😭: cli/go-gh#23 - I tried to guess current page via Exec for "gh repo list $user --json id --limit 1000" but response time was very slow. 🐌 See https://github.com/cli/go-gh/blob/trunk/example_gh_test.go#L16
nicokosi
added a commit
to nicokosi/gh-collab-scanner
that referenced
this issue
Mar 14, 2022
Current page can be set via a new '--page' flag (default: 1): $ gh collab-scanner --org softwarevidal --page 2 $ gh collab-scanner --user nicokosi --page 2 Page size is hard-coded to 100. PS: - I could not retrieve pagination info (page x on y) because of this limitation 😭: cli/go-gh#23 - I tried to guess current page via Exec for "gh repo list $user --json id --limit 1000" but response time was very slow. 🐌 See https://github.com/cli/go-gh/blob/trunk/example_gh_test.go#L16
nicokosi
added a commit
to nicokosi/gh-collab-scanner
that referenced
this issue
Mar 14, 2022
Current page can be set via a new '--page' flag (default: 1): $ gh collab-scanner --org softwarevidal --page 2 $ gh collab-scanner --user nicokosi --page 2 Page size is hard-coded to 100. PS: - I could not retrieve pagination info (page x on y) because of this limitation 😭: cli/go-gh#23 - I tried to guess current page via Exec for "gh repo list $user --json id --limit 1000" but response time was very slow. 🐌 See https://github.com/cli/go-gh/blob/trunk/example_gh_test.go#L16
nicokosi
added a commit
to nicokosi/gh-collab-scanner
that referenced
this issue
Mar 14, 2022
Current page can be set via a new '--page' flag (default: 1): $ gh collab-scanner --org softwarevidal --page 2 $ gh collab-scanner --user nicokosi --page 2 Page size is hard-coded to 100. PS: - I could not retrieve pagination info (page x on y) because of this limitation 😭: cli/go-gh#23 - I tried to guess current page via Exec for "gh repo list $user --json id --limit 1000" but response time was very slow. 🐌 See https://github.com/cli/go-gh/blob/trunk/example_gh_test.go#L16
nicokosi
added a commit
to nicokosi/gh-collab-scanner
that referenced
this issue
Mar 14, 2022
Current page can be set via a new '--page' flag (default: 1): $ gh collab-scanner --org softwarevidal --page 2 $ gh collab-scanner --user nicokosi --page 2 Page size is hard-coded to 100. PS: - I could not retrieve pagination info (page x on y) because of this limitation 😭: cli/go-gh#23 - I tried to guess current page via Exec for "gh repo list $user --json id --limit 1000" but response time was very slow. 🐌 See https://github.com/cli/go-gh/blob/trunk/example_gh_test.go#L16
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pagination is currently not possible using
RESTClient
and takes lots of manual work usingGQLClient
. We should support this feature for both. Initial implementation idea is to add apagination
options toClientOptions
which would enable this for both clients and be a noop for theHTTPClient
.The text was updated successfully, but these errors were encountered: