Overview

The setUserRole mutation allows for the updating of a user’s role within a team.

Arguments

user_id
String
required

The unique identifier of the user.

role
Role
required

The Role to be assigned to the user. Valid types for user are admin and user

Usage Example

To set a user’s role, provide the user’s ID and the desired role as arguments to the mutation. Here’s an example of how this mutation could be used:

mutation setUserRole($userId: String!, $role: Role!) {
  setUserRole(user_id: $userId, role: $role) {
    id
    name
    email
    role
  }
}

Additional Resources