Members

A member is an individual user in your organization. Members have permissions that can be configured at the organization-level or the project-level. Use the roles query to get the id for each role.

Add members at project-level

Use the setProjectMembership mutation to add a member to a project and select their role.

FieldTypeDescription
userIdStringID of the user to add to the project
projectIdStringID of the project to add the member to
roleIdStringAdmin: cjlvi91a41aab0714677xp87h

Team manager: cjlvi919q1aa80714b7z3xuku

Project-based: cjmb6xy80f5vz0780u3mw2rj4

Reviewer: cjlvi919b1aa50714k75euii5

Labeler: cjlvi914y1aa20714372uvzjv
mutation SetProjectMembership { 
    setProjectMembership ( 
        data: { 
            userId: "<USER_ID>"
            projectId: "<PROJECT_ID>"
            roleId: "<ROLE_ID>" 
        } 
    ) { 
        user { email } 
        project { name } 
        role { name } 
    }
}

Get available roles

Use the roles query to get the IDs for all of the member roles. Use the first argument to specify how many objects to return and the skip argument to specify how many objects to skip.

FieldTypeDefinition
nameStringRole name
idIDRole ID
permissionsPermissionFlagAll available permissions for that role
query GetAvailableRoles { 
    roles (
        first: 10
        skip: 1
    ){ 
        name 
        id
    	permissions
    }
}

List member projects

Use the users query to get a list of all the projects a member is associated with.

query GetUserProjects { 
    users ( where: {email:"<USER-EMAIL>"}) {
        id 
        projects { 
            name 
            id 
        } 
    }
}

Remove members

Use this setProjectMembership mutation to remove project-based members.

FieldTypeDescription
userIdIDMember ID
roleIdIDSet cjmb6xy80f5vz0780u3mw2rj4 as the roleId to set role to None.
projectIdIDProject ID
mutation RemoveMemberFromProject {
    setProjectMembership (data: {
        userId:"<USER_ID>"
     	roleId: "cjmb6xy80f5vz0780u3mw2rj4"
     	projectId:"<PROJECT_ID>"
    }) {
        id  
    }
}