Skip to main content

UserMutations

No description

type UserMutations {
createUser(
firstName: String!
lastName: String
email: String!
roleId: Long
): CreateUserResult
updateUserRole(
webUserId: Long!
roleId: Long!
): UserData
setUserDisabled(
webUserId: Long!
isDisabled: Boolean!
): UserData
updateUserProfile(
webUserId: Long!
firstName: String!
lastName: String
email: String!
slackId: String
): UserData
setMemberSlackId(
webUserId: Long!
slackId: String
): UserData
inviteExistingUser(
email: String!
roleId: Long
): OrganizationInvitation
resendInvitation(
invitationId: Long!
): OrganizationInvitation
revokeInvitation(
invitationId: Long!
): Boolean
acceptInvitation(
token: String!
): Organization
acceptInvitationById(
invitationId: Long!
): Organization
declineInvitation(
invitationId: Long!
): Boolean
removeExternalMember(
webUserId: Long!
fallbackAssignee: Long
): Boolean
}

Fields

UserMutations.createUser ● CreateUserResult object

Create a new user in the organization (requires canManageUsers permission). Returns an outcome rather than failing when the email already has an account: accountExistsElsewhere means the address belongs to a real person in another organization, who must be invited and must consent.

UserMutations.createUser.firstName ● String! non-null scalar
UserMutations.createUser.lastName ● String scalar
UserMutations.createUser.email ● String! non-null scalar
UserMutations.createUser.roleId ● Long scalar

UserMutations.updateUserRole ● UserData object

Update a user's role in this organization (requires canManageUsers permission). For an external member this changes their role here only, never in their home organization.

UserMutations.updateUserRole.webUserId ● Long! non-null scalar
UserMutations.updateUserRole.roleId ● Long! non-null scalar

UserMutations.setUserDisabled ● UserData object

Enable or disable a user (requires canManageUsers permission). Rejected for external members: the flag is global, so it would lock them out of their own organization — remove their access instead.

UserMutations.setUserDisabled.webUserId ● Long! non-null scalar
UserMutations.setUserDisabled.isDisabled ● Boolean! non-null scalar

UserMutations.updateUserProfile ● UserData object

Update a user's profile: name, last name, email and Slack id. A user may always edit themselves; editing other users requires canManageUsers permission. Name and email are rejected for external members, whose identity belongs to their own organization.

UserMutations.updateUserProfile.webUserId ● Long! non-null scalar
UserMutations.updateUserProfile.firstName ● String! non-null scalar
UserMutations.updateUserProfile.lastName ● String scalar
UserMutations.updateUserProfile.email ● String! non-null scalar
UserMutations.updateUserProfile.slackId ● String scalar

UserMutations.setMemberSlackId ● UserData object

Set a member's Slack id for this organization only. Unlike updateUserProfile this cannot touch global identity fields, which is what makes it usable on external members.

UserMutations.setMemberSlackId.webUserId ● Long! non-null scalar
UserMutations.setMemberSlackId.slackId ● String scalar

UserMutations.inviteExistingUser ● OrganizationInvitation object

Invite an existing account to join this organization as an external member (requires canManageUsers permission). Access is granted only once they accept.

UserMutations.inviteExistingUser.email ● String! non-null scalar
UserMutations.inviteExistingUser.roleId ● Long scalar

UserMutations.resendInvitation ● OrganizationInvitation object

Issue a fresh token and a fresh 48h window on a pending invitation (requires canManageUsers permission)

UserMutations.resendInvitation.invitationId ● Long! non-null scalar

UserMutations.revokeInvitation ● Boolean scalar

Withdraw a pending invitation (requires canManageUsers permission)

UserMutations.revokeInvitation.invitationId ● Long! non-null scalar

UserMutations.acceptInvitation ● Organization object

Accept an invitation from its emailed token. Requires a signed-in session belonging to the invitee.

UserMutations.acceptInvitation.token ● String! non-null scalar

UserMutations.acceptInvitationById ● Organization object

Accept an invitation from the in-app notification card, where the session already proves identity

UserMutations.acceptInvitationById.invitationId ● Long! non-null scalar

UserMutations.declineInvitation ● Boolean scalar

Decline an invitation addressed to the signed-in user

UserMutations.declineInvitation.invitationId ● Long! non-null scalar

UserMutations.removeExternalMember ● Boolean scalar

Revoke an external member's access to this organization and clean up their org-scoped data (requires canManageUsers permission)

UserMutations.removeExternalMember.webUserId ● Long! non-null scalar
UserMutations.removeExternalMember.fallbackAssignee ● Long scalar

Returned By

users mutation