Update Milestone

Input attributes

When you want to update a milestone inside your accountability component, you need to rely on the MilestoneAttributes type, which has the following input fields:

• title                             (Optional)   - JSON
• entry_date                        (Optional)   - String
• description                       (Optional)   - JSON

Sample request

The UpdateMilestone mutation allows authenticated administrators to update a milestone within a result in a Decidim accountability component. This mutation uses the existing UpdateMilestone command from the admin controller.

mutation updateMilestone($componentId: ID!, $resultId: ID!, $input: UpdateMilestoneInput!){
   component(id: $componentId){
    ... on AccountabilityMutation {
      result(id: $resultId){
      	updateMilestone(input: $input){
          id
        }
      }
    }
  }
}

Example of submitted variables

{
  "componentId": "3",
  "resultId": "5",
  "input": {
    "id": "7",
    "attributes": {
      "entryDate": "2025-12-31",
      "description": {
        "en": "Milestone description changed from API"
      },
      "title": {
        "en": "Milestone title changed from API"
      }
    }
  }
}