Create Milestone
Input attributes
When you want to add or create a milestones in your accountability component, you need to rely on the MilestoneAttributes type, which has the following input fields:
• title (Required) - JSON
• entry_date (Required) - String
• description (Optional) - JSON
Sample request
The CreateMilestone mutation allows authenticated administrators to create new milestones in a Decidim accountability component. This mutation uses the existing CreateMilestone command from the admin controller.
mutation createMilestone($componentId: ID!, $resultId: ID!, $input: CreateMilestoneInput!){
component(id: $componentId) {
... on AccountabilityMutation {
result(id: $resultId) {
createMilestone(input: $input) {
id
}
}
}
}
}
Example of submitted variables
{
"componentId": "3",
"resultId": "5",
"input": {
"attributes": {
"title": { "en": "My milestone title" },
"description": { "en": "A brief description of the milestone." },
"entryDate": "2025-12-31"
}
}
}