Code Docs


Pluvo Developers Docs


Back to website:

Dutch: Pluvo.nl

English: Pluvo.eu

Model

<aside> šŸ’” SeeĀ  schema for more information about the schema.

</aside>

type Group {
    id: UUID!
    name: String!
    enableChat: Boolean!
    ref: String
		isEditable: Boolean!
}

Queries

Get groups

Get a list of all groups in your organization.

query groups {
    groups {
        ref
        name
    }
}

Get group

Get a single group in your organization. You can use theĀ refĀ of the group to get it.

query group {
    group(ref: "group-ref") {
        ref
        name
    }
}

Mutations

Create group

Create a new group in your organization, you can pass your own customĀ ref.

mutation createGroup {
    createGroup(group: {ref:"group-ref", name: "Test Group", isEditable: false}) {
        group {
            ref
            name
        }
    }
}

Update group

Update a group usingĀ ref.

mutation updateGroup {
    updateGroup(ref:"group-ref", group: {name:"New title", isEditable: false}) {
        group {
            ref
            name
        }
    }
}

Add users to group

You can add multiple users to a group by using refs.

Note: This action isn't done instant, so it can take a few minutes to be done

mutation addUsersToGroup {
    addUsersToGroup(groupRef: "group-ref", userRefs: ["user-ref", "user-2-ref"]) {
        addedRefs  # Refs of users that are removed
        alreadyAddedRefs # Refs of users that are already in the group
        failedRefs # Refs of users that are incorrect
    }
}

Remove users from group

You can add remove users from a group by using refs.

Note: This action isn't done instant, so it can take a few minutes to be done.

mutation removeUsersFromGroup {
    removeUsersFromGroup(groupRef: "group-ref", userRefs: ["user-ref", "user-2-ref"]) {
        removedRefs # Refs of users that are removed
        alreadyRemovedRefs # Refs of users that are not in the group
        failedRefs # Refs of users that were incorrect
    }
}

Table of Contents