Skip to content
Snippets Groups Projects
Closed Support efficient repository listing pagination in the GraphQL API
  • View options
  • Support efficient repository listing pagination in the GraphQL API

  • View options
  • Closed Issue created by Warren Gifford

    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).

    Context (from Slack)

    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.

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first