Github GraphQl get REPOSITORY subscriber count and the list of subscribers

Viewed 431

I am using the following to search repositories by query name "android"

{
  search(query: "android", type: REPOSITORY, first: 50) {
    repositoryCount
    edges {

      node {
        ... on Repository {
          id
          name
          description
          forkCount
          owner{
            avatarUrl
          }
        }
      }
    }
  }
}

How to get the REPOSITORY subscriber count and the list of subscribers

Thanks In advance :)

2 Answers

You are looking for watchers, the terminology used in v3 is subscribers, check this :

{
  search(query: "android", type: REPOSITORY, first: 50) {
    repositoryCount
    edges {
      node {
        ... on Repository {
          nameWithOwner
          watchers(first: 100) {
            totalCount
            nodes{
              login
            }
          }
        }
      }
    }
  }
}

Try it in the explorer

Related