menu button

Chapter 4: Update

Update Agenda Item

This API involves updating Agenda Items.

Agenda items can be updated to reflect refined or corrected content.


  • updateAgendaItemById mutation can be used to update agenda item in a specific meeting. It takes agendaItem as an input parameter — make sure to pass it as a JSON string.

Example object structure of the input parameter

const exampleAgendaItem = JSON.stringify(
   {
        "agendaItem": {
            "id": "19",
            "depth": 0,
            "maxDepth": 3,
            "metaData": "",
            "classType": "politics", // politics or summary
            "title": "Team-Meeting: Projekt Alpha",
            "textList": {
            "0": [
                "Johannes begrüßt Sarah. Das Meeting ist online. Er arbeitet in Hamburg. Sarah ist in München."
            ],
            "1": [
                "Johannes begrüßt Sarah.",
                "Das Meeting findet online statt.",
                "Johannes arbeitet in Hamburg.",
                "Sarah arbeitet in München."
            ],
            "2": [
                "Johannes startet das Meeting. Es ist online. Er ist in Hamburg. Sarah bestätigt, dass sie in München ist."
            ]
            },
            "resolutionList": [],
            "createdAt": "2025-05-04T18:33:50.247399+00:00"
        }
    }
);

Example Graphql mutation object

    export const UPDATE_AGENDA_ITEM_BY_ID = `
        fragment agendaDetails on ApiAgendaItemType {
            id
            classType
            title
            resolutionList {
                resolution
                decision
            }
            textList
            createdAt
        }

        mutation UpdateAgendaItemById($agendaItem:String!){
            updateAgendaItemById(agendaItem:$agendaItem){
                agendaItem{
                    ...agendaDetails
                }
            }
        }
    `

Example JS code

    import axios from "axios";

    async function updateAgendaItemById(agendaItem) {
        const dataObj = {
            query: UPDATE_AGENDA_ITEM_BY_ID,
            variables: {
                agendaItem: JSON.stringify(agendaItem),
            },
        };

        return await axios({
            method: "post",
            url: process.env.VUE_APP_GRAPHQL_API,
            data: JSON.stringify(dataObj),
            headers: {
                "Content-Type": "application/json",
                "x-api-key": process.env.VUE_APP_API_KEY,
            },
        })
        .then((response) => {
            const responseData = response.data.data.updateAgendaItemById;
        
            return responseData
        })
        .catch((error) => {
            console.log(error);
        })
    }

After running the above query, it returns an object where:

  • Each agenda item follows a structure similar to the OParl standard.
  • The textList field is a JSON-stringified object containing the agenda item content.
    • Inside textList, keys such as 0, 1, and 2 represent different depth levels of the content. These are generated after the data is edited and the createAnalysis mutation is executed.
  • The title field holds the name of the agenda item.
  • The resolutionList is also a JSON object that contains any resolutions associated with the agenda item.

Example resolutionList format:

{
    "resolutionList": [
        {
            "resolution": "Resolution 1",
            "decision": "Decision 1"
        }
    ]
}

checkAnalysisResults

  • This is a periodically called query that checks the analysis results and updates the agenda items accordingly.
  • If the classType parameter is not None, the creation is considered successful.
  • At this point, the getResultItemsByProtocol query can be used to retrieve the results.

Have questions?

Still have questions? Talk to support.