Bug when querying organization members using GraphQL

Using https://developer.github.com/v4/explorer/, I’m able to query all users of my organization with my login. However, if I’m using GraphQL directly using my personal access token (which have all permissions enable), I can only see the public users. This is the query:

query ($organization: String!, $after: String) {
  organization(login: $organization) {
    membersWithRole(first: 100, after: $after) {
      totalCount
      pageInfo {
        hasNextPage
        endCursor
      }
      nodes {
        id
        login
      }
    }
  }
}

Sorry, the problem was that I was using the wrong token when I added the permissions. Solved.

Hey @plentz, Thanks for coming back and sharing what worked for you!