Hello community,
I am pretty new to monday.com, and this is my first experience with GraphQL
I am using Javascript in my API to mutate my board, specifically:
My objective:
I have a board with a few summary columns and a button. Each of the items of that board has a bunch of subitems. The purpose of the button mentioned above is to trigger my javascript code that writes a number into each of the subitems.
What is given:
BoardID and item_id (as pulseId) or rather, which item I clicked the button on.
From here, I seemed to be able to get to the board’s subitems ID:
query{boards(ids:$boardID){columns(ids:"subitems"){settings_str}}}
followed by: let subID = JSON.parse(data_subs.data.boardsd0].columnsn0].settings_str).boardIdsd0]
If there’s a better way to get to sub-board-id please let me know, but ok.
So far so good. but …
My issue:
I can’t find a way to traverse the tree, that is, how to go from the given elements to loop through the subitems of a specific item, getting their IDs. Once I have the id, I know how to
for each ID I run ‘change_column_value(…)’
Any recommendation is greatly appreciated.
Thanks in advance,