Filter users on RepositoryPermission?


#1

I’m new to GraphQL and trying to build a v4 query which would return all users with WRITE access for a given repository. The best I’ve come up with is:

query RepoWriters($org: String!, $repo: String!){
  repository(owner:$org, name:$repo){
    collaborators(first:3, affiliation: ALL){
      edges{
        permission
        node{
          ... on User{
            login
          }
        }
      }
    }
  }
}

I can’t figure a way to add any sort of filter onto an element to obtain just the users with “WRITE” permission.


#2

I could use something like this too. I wish the edge or node had an argument to filter by.

Something like this:

    collaborators(first:100, affiliation: ALL){
      edges(permission: ADMIN) {
        node{
            login
          }
        }
      }