Hello
We are developing an API to update some column values based on another internal tool we are using.
We noticed that the mutation requires both BoardID & ItemID and were wondering, since the itemID is unique in the platform, why is the boardID also required?
I am asking as we need to run another query each time to fetch the boardID based on the itemID so I am trying to see if there is a way to optimize our script without this additional query to fetch the boardID.
Thank you!
Linda
How are you getting the itemIds to start with? That is where you’d pick up the boardId to store usually.
I do agree its annoying requiring the boardId, but I think part of it is that its needed to lookup valid statuses and column types for processing the mutation.
Thank you for your response!
The ItemID is being captured by a different API which creates the item. But since the item may change board between its creation and this new API we are developing, therefore we don’t know the boardID any longer.
I see for the reason why it is needed…
So you are tracking the itemId in the other application, can you store the boardId there?
Using the trigger (in a Monday App) called “item moved to board” you can send back to your other API the new boardId when an item moves board. That way its kept up to date. But at that point, I’d say youre better of just executing the query below when needed - from an implementation standpiont.
query {
items (ids: 12345) {
board {
id
}
}
}
The only question is, how are items being moved from board-to-board? I’m assuming a Monday automation or manually?
Thank you again for the details! This is very helpful.
I have an automation indeed to move items from one board to another when a status changes.