Groups

English only

Use Cases

Get single object

Retrieves a single group via id or ref. Useful for requesting group details or members.

query {
  group(id: "uuid-here") {
    id
    name
    ref
    maxUsers
    enableChat
    isEditable
  }
}

Get list

Provides a list of all groups in the organization. Use this for simple lists without filtering.

query {
  groups {
    id
    name
    ref
  }
}

Create object

Creates a new group. You can optionally add a ref for your own identification.

mutation {
  createGroup(group: {
    name: "New group"
    maxUsers: 50
    enableChat: true
    ref: "group-ref"
  }) {
    group {
      id
      name
      ref
    }
  }
}

Update object

Modifies an existing group. You can adjust properties such as name, enableChat or maxUsers.

mutation {
  updateGroup(
    id: "uuid-here"
    group: {
      name: "Updated group"
      enableChat: false
    }
  ) {
    group {
      id
      name
    }
  }
}

Delete group

Deletes a single group. Use this with care, the group will be permanently removed.

mutation {
  deleteGroup(id: "uuid-here") {
    ok
  }
}

Delete multiple groups

Deletes multiple groups at once. You will receive an overview of successful and failed deletions.

mutation {
  deleteGroups(ids: ["uuid-1", "uuid-2"]) {
    bulkDelete {
      succeededIds
      failedIds
    }
  }
}

GraphQL Definitions

Type

The Group type describes the properties of a group. This includes name, reference code, limits and access options.

type Group {
  id: UUID!
  name: String!
  ref: String
  maxUsers: Int!
  enableChat: Boolean!
  isEditable: Boolean!
  users: UserConnection
  managers: UserConnection
  trainings: [TrainingListItem!]!
  extraCategoryValues: [ExtraCategoryValue!]!
  isEditable: Boolean!
  userCount: Int
  managerCount: Int
  permissions: JSONString
  skills: [SkillListItem!]
}

Queries

Use group to retrieve a specific group, or groups/paginatedGroups for lists.

group(id: UUID, ref: String): Group
groups(groupVia: GroupVia): [Group!]
paginatedGroups(...): GroupConnection

Mutations

Mutations to create, modify or delete groups. You can also delete multiple groups at once.

createGroup(group: CreateGroupInput!): CreateGroup
updateGroup(id: UUID, ref: String, group: UpdateGroupInput!): UpdateGroup
deleteGroup(id: UUID!): DeleteGroup
deleteGroups(ids: [UUID!]): DeleteGroups

Notes

  • Use ref or id to select specific groups.
  • paginatedGroups is recommended for extensive filtering, sorting and pagination.
  • Additional mutations exist for managing users and managers within a group.
Sluit melding