CreateDashboardWidget
Create a new dashboard widget with typed configuration
Signature
mutation {
CreateDashboardWidget(dashboardId: ..., technicalCode: ..., label: ..., type: ..., sortIndex: ..., displayed: ...)
}
Retourne : DashboardWidget!
Arguments
| Nom | Type | Requis | Défaut | Description |
|---|---|---|---|---|
dashboardId | ID! | ✓ | — | Parent Dashboard ID |
technicalCode | String! | ✓ | — | Unique technical identifier |
label | String! | ✓ | — | Display label (default locale) |
type | DashboardWidgetType! | ✓ | — | Widget type (determines which child entity is created) |
configJson | String | — | JSON-encoded configuration (parsed into typed child entity fields) | |
sortIndex | Int! | ✓ | — | Display order within the dashboard |
displayed | Boolean! | ✓ | — | Whether the widget is visible |
dataAlgorithmId | ID | — | Algorithm providing the SQL data query | |
displayedAlgorithmId | ID | — | Algorithm controlling widget visibility | |
localizedLabel | [LocalizedStringInput] | — | Translated labels | |
width | DashboardWidgetWidth | — | 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
) {
# Sélectionner les champs souhaités
}
}