Added mutation for multiple items
Added a function which allows to modify multiple items at once using graphQL's mutation query. The function takes a list of dictionaries with methods and any additional parameters the method requires.
This already saved me hours when working with large sets of data, as the only way to work with multiple items with this library was to call the update/create functions one by one, whereas now you're able to perform multiple operations at once.
Hope you find it as much of a lifesaver too!
items_data = [
{
"method": "create_item",
"board_id": 1437462152,
"group_id": "new_group",
"item_name": "New Item",
"column_values": {"status": "done"},
"create_labels_if_missing": True
},
{
"method": "change_multiple_column_values",
"board_id": 1435323152,
"item_id": 1345543264,
"column_values": {"status": "done"},
"create_labels_if_missing": True
}
]
response = monday.items.mutate_multiple_items(items_data)
Hi @chdastolfo, please let me know if there's time to review this pull request. Thanks!
Also! Please add this method to the docs in docs/README.rst
@chdastolfo Being able to group mutations/queries is a really useful feature. Are there any plans for this PR to make it into a release?