Update Result
Input attributes
When you want to update a result in your accountability component, you need to rely on the ResultAttributes type, which has the following input fields:
• decidim_accountability_status_id (Optional) - Integer
• description (Optional) - JSON
• end_date (Optional) - String
• external_id (Optional) - String
• parent_id (Optional) - Integer
• progress (Optional) - Float
• project_ids (Optional) - Array
• proposal_ids (Optional) - Array
• start_date (Optional) - String
• taxonomies (Optional) - Array
• title (Optional) - JSON
• weight (Optional) - Integer
Sample request
The UpdateResult mutation allows authenticated users to update results in a Decidim accountability component. This mutation uses the existing UpdateResult command from the admin controller.
mutation updateResult($componentId: ID!, $resultId: ID!, $input: UpdateResultInput!){
component(id: $componentId){
... on AccountabilityMutation {
result(id: $resultId){
update(input: $input){
id
url
}
}
}
}
}
Example of submitted variables
{
"componentId": "1",
"resultId": "18",
"input": {
"attributes": {
"title": {
"en": "My Result Title - updated"
}
}
}
}