In this second part, we dive deeper into the technical structure of extra categories in Pluvo. Here you'll find the specific GraphQL types used to store values, how they connect to entities like users or trainings, and how to manage them using mutations.
type ExtraCategoryStringValue {
category: ExtraCategory!
color: Color
stringValue: String!
modelId: UUID!
}type ExtraCategoryDatetimeValue {
category: ExtraCategory!
color: Color
datetimeValue: DateTime!
modelId: UUID!
}type ExtraCategoryChoiceValue {
category: ExtraCategory!
color: Color
choiceValue: ExtraCategoryChoiceOption!
modelId: UUID!
}type ExtraCategoryBooleanValue {
category: ExtraCategory!
color: Color
booleanValue: Boolean!
modelId: UUID!
}All value types contain:
category: the corresponding ExtraCategorymodelId: ID of the linked object (e.g., user or training)color: optional color for visualizationextraFields on User or Training).ref fields on choice options enable external mapping with other systems.Color is optional and is used for visual indication in interfaces.type ExtraCategory {
id: ID!
title: String!
extraFields: [ExtraField!]
archivedAt: DateTime
}type ExtraField {
id: ID!
key: String!
label: String!
type: ExtraFieldType!
}enum ExtraFieldType {
TEXT
NUMBER
DATE
SELECT
MULTISELECT
BOOLEAN
}createExtraCategory(category: CreateExtraCategoryInput!): CreateExtraCategoryPayload
updateExtraCategory(id: UUID!, category: UpdateExtraCategoryInput!): UpdateExtraCategoryPayload
archiveExtraCategories(archive: Boolean!, ids: [UUID!]!): ArchiveExtraCategoriesPayloadquery {
extraCategories(contentType: GROUP) {
id
title
}
}mutation {
createExtraCategory(
extraCategoryInput: {
name: "Target Groups"
color: "#00AAFF"
filter: true
showLabel: true
categoryType: MULTISELECT
forModelTypes: [GROUP]
multipleChoices: true
choiceOptions: [
{ stringValue: "MBO", color: "#F7C100" }
{ stringValue: "HBO", color: "#FF6600" }
]
}
) {
extraCategory {
id
title
}
}
}mutation {
updateExtraCategory(
id: "uuid-here"
extraCategoryInput: {
name: "New title"
showLabel: false
forModelTypes: [GROUP, OFFER]
}
) {
extraCategory {
id
title
}
}
}mutation {
updateExtraCategoryValues(
contentType: GROUP
modelId: "uuid-of-group"
values: [
{
categoryId: "uuid-of-category"
choiceValues: [{ stringValue: "HBO" }]
},
{
categoryRef: "birthdate"
datetimeValue: "1990-01-01T00:00:00Z"
}
]
) {
extraCategoryValues {
... on ExtraCategoryChoiceValue {
choiceValue {
stringValue
}
}
... on ExtraCategoryDatetimeValue {
datetimeValue
}
}
}
}ExtraCategoryValuesUpdateInput, depending on the type (stringValue, booleanValue, datetimeValue, choiceValues).id or ref.Color value must be provided in hex code, for example #FF9900.