Skip to main content

CreateDashboardWidget

Stable

Create a new dashboard widget with typed configuration

Signature

mutation {
CreateDashboardWidget(dashboardId: ..., technicalCode: ..., label: ..., type: ..., sortIndex: ..., displayed: ...)
}

Retourne : DashboardWidget!

Arguments

NomTypeRequisDéfautDescription
dashboardIdID!Parent Dashboard ID
technicalCodeString!Unique technical identifier
labelString!Display label (default locale)
typeDashboardWidgetType!Widget type (determines which child entity is created)
configJsonStringJSON-encoded configuration (parsed into typed child entity fields)
sortIndexInt!Display order within the dashboard
displayedBoolean!Whether the widget is visible
dataAlgorithmIdIDAlgorithm providing the SQL data query
displayedAlgorithmIdIDAlgorithm controlling widget visibility
localizedLabel[LocalizedStringInput]Translated labels
widthDashboardWidgetWidthLayout width (defaults to full when omitted)
localizedContent[LocalizedStringInput]Translated HTML contents (used when type=html); the default-locale entry seeds the entity's main column

Exemple

mutation {
CreateDashboardWidget(
dashboardId: $dashboardId
technicalCode: $technicalCode
label: $label
type: $type
sortIndex: $sortIndex
displayed: $displayed
) {
# Sélectionner les champs souhaités
}
}