Still on item ids, the new items_page will only work under a boards query which unfortunately is a step backwards from the previous item query where all you needed to know is the item id to get information about the item.
What happens when you have multiple item ids which are located in different boards? Does it mean you will have to query for all the board ids and then in the boards query, include all the board ids?
So in effect, the final query might look like this:
{
boards(ids: [MULTIPLE_BOARD_IDS_HERE]) {
items_page(ids:[ITEM_IDS_FROM_THE_DIFFERENT_BOARDS], limit: 3) {
cursor
items {
id
name
}
}
}
}
You need to send the item IDs in the query_params argument:
query {
boards (ids:4579962334) {
items_page(query_params:{ids:4579963913}) {
items {
id
board {
id
}
}
}
}
}
As for why it’s a step backwards; I don’t fully understand. In the previous version you also had to nest the items query inside a boards query. What’s missing?
You do still have the option of returning items by ID directly, using the root items query:
Also, concerning the items query, do I correctly understand that, items can still be used as a root query, provided an id or ids are specified and must not always be nested under the new items_page query?
If yes, what does this part of the documentation mean then?
Regarding the items query – yes, you are correct. You can still use items as a root query.
Regarding the documentation – great catch, I wrote that sentence and realize how it’s unclear/wrong. I will update it to the following:
Queries that use items inside the boards or groups object must nest them in the items_page object
Regarding getting no data for the above item – looks like a mistake in your query or a bug. Can you do the following basic troubleshooting and, if it still fails, open a ticket?
Check the item and board IDs are accurate
Check the logged-in user has access to the items and boards
Check that the item has not been deleted/archived
Check that the board or group has not been deleted/archived
Hello @dipro,
Thanks for the response and also the troubleshooting ideas. It helped. I had mistakenly used the wrong board id.
Looking forward to the updates in the documentation