Thanks Helen, I have it working now, but in a bit of a strange way. It’s working fine, but there may be a better way to do things. Either way, I thought I’d write it up for others.
Starting with the item_id of a subitem, first query to find the board that the subitem is part of:
query {items (ids: [1234]) {
board { id }
}
}
You get a response like this:
{
"data": {"items": [{"board": {"id": "2345"}}]},
"account_id": 1111
}
This board id can then be fed into a modify query:
mutation{
change_column_value(
board_id: 2345,
item_id: 1234,
column_id: "status",
value: "{\"label\": \"Some new status!\"}") {
id
}
}
I’m not sure why you need to find out the board ID when the subitem’s item_id is unique, I’m also not sure whether it’s possible to nest graphql queries so you can use the result of the first as part of the second in one API request. On the other hand, I guess it’s pretty rare to start with a subitem’s item_id and not know which board it’s from. shrug