Skip to content

Get Array of repositoryOwner in GraphQL #24588

Answered by jcubic
jcubic asked this question in API and Webhooks
Discussion options

You must be logged in to vote

Just if someone need this here is the answer (if you can get id of the user then you can get them all in one query):

{
  nodes(ids: ["MDQ6VXNlcjI4MDI0MQ==", "MDQ6VXNlcjEwMjQwMjU="]) {
    ... on User {
      name
      login
    }
    ... on RepositoryOwner {
      repositories(first: 20, orderBy: {field: STARGAZERS, direction: DESC}, privacy: PUBLIC) {
        edges {
          repository: node {
            name
            stargazers {
              totalCount
            }
          }
        }
      }
    }
  }
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment