Support efficient repository listing pagination in the GraphQL API
- Truncate descriptions
Created by: tsenart
We currently only support listing more and more results with the first
argument, but don't support passing in an after
cursor, and don't fill in an endCursor
in the returned PageInfo
(which we could do with graphqlutil.NextPageCursor
).
Hi team, I have a question about fetching the list of repositories ingested in Sourcegraph via an API call. I was looking at the example in your docs here for the "List the first 1,000 repositories" API call. The problem I am encountering when using this to pull the entire list for all of our repositories (about 375k repos), the list is too long. As a result, I'm getting Gateway Timeout errors. I looked through the GraphQL docs to see if I can paginate through the list (i.e. get the first 10k repos, then make another API call to get the next 10k repos, and so on). However, I could not find in the docs that this is possible. So I just want to confirm that with you all before going with a different approach to fetching the list of all repositories.