Chapter 4: Update
Create Analysis
- After updating the agenda item, you need to run the
createAnalysismutation. This will trigger the analysis process, and the AI will perform its work. Since this is an asynchronous operation, it may take some time to complete. - To monitor progress, you can check the analysis status by calling the
checkAnalysisResultsquery.
Once the analysis is complete, you can retrieve the results by callinggetResultItemsByProtocol.
Example GraphQL Query
export const CREATE_ANALYSIS = `
mutation CreateAnalysis($protocolSlug:String!){
createAnalysis(protocolSlug:$protocolSlug) {
success
}
}
`;
Parameters for createAnalysis Mutation
1. protocolSlug
- A unique identifier (slug) for the protocol (meeting or document) to create the analysis for
- Example: protocolSlug: “SNbtVr4Ls7Yzf3jMxX33Yzf3jMxX33”
Example JS code
import axios from "axios";
async function createAnalysis(protocolSlug) {
const dataObj = {
query: CREATE_ANALYSIS,
variables: {
protocolSlug: protocolSlug,
},
};
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.createAnalysis;
if(responseData.success) {
// do further work
return responseData
}
})
.catch((error) => {
console.log(error);
})
}
- Once the creation of analysis is complete, the
checkAnalysisResultsquery can be used to periodically check the status.
Have questions?
Still have questions? Talk to support.