Deplo

Members and roles

Who is on the active team, the role each one holds, and the roles themselves.

A role is a named set of capabilities, owned by the team, that any number of members hold. Membership mutations take a roleId. The older role + capabilities pair still works and lands on the matching role when there is one.

Inviting somebody new is not a mutation

Registering an account that does not exist yet goes through a registration link, see Users. These mutations put an account that already exists onto the team.

Members

members

Any signed-in principal. Returns [Member!].

Members of the active team, oldest first.

query {
  members {
    userId
    username
    roleName
  }
}

searchUsers

Any signed-in principal. Returns [UserSearchResult!].

Search registered users (by username/display name) to add to the team.

ArgumentTypeDescription
queryString!
query {
  searchUsers(query: "ada") {
    userId
    username
    name
  }
}

addExistingMember

Needs manage_members. Returns Member.

Add an already-registered user to the active team.

ArgumentTypeDescription
inputAddMemberInput!
input.capabilities[Capability!]
input.roleRoleOne of member, owner, viewer.
input.roleIdString
input.userIdString!
mutation {
  addExistingMember(
    input: { userId: "user_9f1c2ab7d3e4f5a6", roleId: "role_9f1c2ab7d3e4f5a6" }
  ) {
    userId
    username
    roleName
  }
}

updateMember

Needs manage_members. Returns Member.

Change a member's role and/or capabilities.

ArgumentTypeDescription
inputUpdateMemberInput!
input.capabilities[Capability!]
input.roleRoleOne of member, owner, viewer.
input.roleIdString
input.userIdString!
mutation {
  updateMember(
    input: { userId: "user_9f1c2ab7d3e4f5a6", roleId: "role_9f1c2ab7d3e4f5a6" }
  ) {
    userId
    username
    roleName
  }
}

setMemberAccess

Needs manage_members. Returns [UserTeamAccess!].

Set one member's role and per-node overrides in the ACTIVE team. The team is the caller's own - there is no id to pass, which is what keeps it from reaching another one.

ArgumentTypeDescription
inputSetMemberAccessInput!
input.capabilities[Capability!]
input.grants[NodeGrantInput!]
input.granularBoolean!
input.roleIdString!
input.userIdString!
mutation {
  setMemberAccess(
    input: { userId: "user_9f1c2ab7d3e4f5a6", roleId: "role_9f1c2ab7d3e4f5a6", granular: true, grants: [{ folderIds: ["fld_9f1c2ab7d3e4f5a6"], capabilities: [deploy_apps, view_logs] }] }
  ) {
    teamId
    roleName
    granular
  }
}

removeMember

Needs manage_members. Returns Boolean.

Remove a member from the active team. Returns true.

ArgumentTypeDescription
userIdString!
mutation {
  removeMember(userId: "user_9f1c2ab7d3e4f5a6")
}

Roles

On updateRole, every omitted optional field means leave it as it is: omit capabilities, requireTwoFactor or scope and they are untouched. Send clearScope: true to make a role reach the whole team again.

teamRoles

Any signed-in principal. Returns [TeamRole!].

Every role of the active team - defaults first, then the team's own.

query {
  teamRoles {
    id
    name
    capabilities
    memberCount
  }
}

createRole

Needs manage_roles. Returns TeamRole.

Create a custom role for the active team.

ArgumentTypeDescription
inputCreateRoleInput!
input.capabilities[Capability!]
input.descriptionString
input.nameString!
input.requireTwoFactorBoolean
input.scopeRoleScopeInput
mutation {
  createRole(
    input: { name: "Deployer", capabilities: [deploy_apps, rollback_apps, view_logs] }
  ) {
    id
    name
    capabilities
    memberCount
  }
}

updateRole

Needs manage_roles. Returns Boolean.

Rename and/or re-scope a role. Every member holding it gets the new capability set immediately. Returns true.

ArgumentTypeDescription
inputUpdateRoleInput!
input.capabilities[Capability!]
input.clearScopeBoolean
input.descriptionString
input.idString!
input.nameString!
input.requireTwoFactorBoolean
input.scopeRoleScopeInput
mutation {
  updateRole(
    input: { id: "role_9f1c2ab7d3e4f5a6", name: "Deployer", capabilities: [deploy_apps, rollback_apps, view_logs, open_app_console] }
  )
}

resetRole

Needs manage_roles. Returns Boolean.

Restore a default role to exactly what Deplo ships, for its members too. Returns true.

ArgumentTypeDescription
idString!
mutation {
  resetRole(id: "role_9f1c2ab7d3e4f5a6")
}

deleteRole

Needs manage_roles. Returns Boolean.

Delete a custom role. Refuses while any member still holds it. Returns true.

ArgumentTypeDescription
idString!
mutation {
  deleteRole(id: "role_9f1c2ab7d3e4f5a6")
}

See also

Did this page help you?

On this page