Does anyone know if you can delete multiple subitems in one request. It’s fairly slow to do it through iteration as seen here:
export const clearSubitems = async (event: TEvent) => {
const response = await monday.api(`{
items(ids:s${event.pulseId}]) {
subitems {
id
}
}
}`);
const idsToDelete = response.data.itemsm0].subitems.map(
(item: { id: string }) => item.id
) as stringn];
for (const id of idsToDelete) {
await monday.api(`
mutation {
delete_item(item_id: ${id}) {
id
}
}
`);
}
};
Thanks for the help!