Skip to content

Fetching Organization members who are owners using GraphQL #24822

Discussion options

You must be logged in to vote

This is one of the cases where the edges and nodes properties of the connection are more different than simply having a totalCount field. This query should work for you:

query ($org: String!, $after: String) {
  organization(login: $org) {
    membersWithRole(first: 100, after: $after) {
      edges {
        cursor
        node {
          login
          name
        }
        role
      }
    }
  }
}

I hope that helps!

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants