Draft: Add a GraphQL mutation to update group members role in bulk
What does this MR do and why?
Add a mutation to change max role of direct members in a group in bulk
Sample mutation and output
Mutation
mutation {
groupMembersUpdate(input: {
groupId: "gid://gitlab/Group/264"
accessLevel: 20
expiresAt: "2022-06-08 08:00:00"
groupMemberIds: [
"gid://gitlab/GroupMember/194",
]
}) {
groupMembers {
id
accessLevel {
integerValue
stringValue
}
}
}
}
Output
{
"data": {
"groupMembersUpdate": {
"groupMembers": [
{
"id": "gid://gitlab/GroupMember/194",
"accessLevel": {
"integerValue": 20,
"stringValue": "REPORTER"
}
}
]
}
}
}
How to set up and validate locally
- Open http://localhost:3000/-/graphql-explorer.
- Run the above mutation for multiple users and check that the role of the group members change.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #354749 (closed)