Need graphql mutation to manage repo access

I am browsing around https://developer.github.com/v4/mutation/ trying to figure out how I craft a mutation to give a team write access to a repository. It doesn’t seem too obvious.

Can someone give me a hint and/or an example?

Thanks,
Steve Maring

1 Like

It seems that I can figure out what repos a team has access to …

query { 
  organization( login: "MyOrg" ) {
    team( slug: "MyTeam" ) {
      name
      repositories( first: 1 ) {
        edges {
          node {
            name
          }
          permission
        }
      }
    }
  }
}

There doesn’t seem to be an updateTeam mutation though.

It looks like that capability existed for about a day 3 years ago.
Added: https://developer.github.com/v4/changelog/2017-07-05-schema-changes/
Removed: https://developer.github.com/v4/changelog/2017-07-06-schema-changes/

Anybody know why it was removed?

Seems that the update feature still exists in the v3 API

I’m looking for the same mutation, and it seems the only option at the moment is to use a mixture of GraphQL and REST API, which isn’t great. :frowning: