Hi everyone,
So I have a monday app, where I need to create multiple subitems after a click action. I saw this post bulk creation and so far the solution there it’s working. The issue comes when I have to create like 15+ subitems at the same time and the query response starts to be noticed by the user causing that they close the pulse view and cancel the process before finishing. I added a spinner feedback in the mean time but I would like to know if there is any way that I can improve the mutation to reduce the execution time.
Thanks in advance.
const queryStrings = subItems
.map(item => {
return `si${item.id}: create_subitem(parent_item_id: $itemId, item_name: "${item.name}", column_values: ${columnValues}) { id, column_values { id, value } }`;
})
.join(' ');
const query = `mutation bulk_create_sub_items($itemId: Int!) { ${queryStrings} }`;
const variables = { itemId: this.itemId };
await monday.api(query, { variables });