Get list of public repositories on GitHub via APIv4

Viewed 919

With GitHub's API v3 it is easy to retrieve a list with all publicly available repositories . I am looking for a way to do the same operation with API v4.

Based on the API v4 reference I came up with two attempts:

  1. Use the repository field. But this field requires the owner and name arguments.

    query {
      repository(owner: "", name: "") {
        name
      }
    }
    
  2. Search for all repositories. But the search field needs the query argument.

    query {
      search(type: REPOSITORY, query: "") {
        repositoryCount
      }
    }
    

Both examples need additional information, which limit the result and are therefore unsuited to my purpose. Is there a way to get a (paginated) list of all public repositories with API v4?

1 Answers
Related