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)
configJsonString—JSON-encoded configuration (parsed into typed child entity fields)
sortIndexInt!✓—Display order within the dashboard
displayedBoolean!✓—Whether the widget is visible
dataAlgorithmIdID—Algorithm providing the SQL data query
displayedAlgorithmIdID—Algorithm controlling widget visibility
localizedLabel[LocalizedStringInput]—Translated labels
widthDashboardWidgetWidth—Layout 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
) {
id
technicalCode
label
localizedLabel {}
type {}
configJson
sortIndex
displayed
width {}
dashboard {}
dataAlgorithm {}
displayedAlgorithm {}
createdAt
updatedAt
}
}