Skip to main content

Best way to get all the sub-items from a parent item

  • July 4, 2020
  • 7 replies
  • 5202 views

Hey all,

I’m new to GraphQL and the Monday API. I’m trying something out for the Hackathon and wonder what the best way is to get all the sub-items from an item? I’m need a ton of times so performances does matter. I saw you need to get the item ID of the parent item to get the sub items via monday.api.

Anyone wants to point me to the right direction? Thanks!

This topic has been closed for replies.

7 replies

  • Community Expert
  • July 7, 2020

Hey @Arno,

there is a chapter about your issue in the documentation:

https://monday.com/developers/v2

You can find it under the buzz word “subitem”.
Hope that helps.

Greetings


  • Community Expert
  • July 7, 2020

If you still struggle you can try this query:

{
   boards(ids: "YOUR_BOARD_ID") {

     items(ids: "YOUR_ITEM_ID") {

       column_values(ids: "subitems") {

          value

      }
    }
  }
}

AlexSavchuk
Forum|alt.badge.img
  • monday.com Team Member
  • July 16, 2020

@TMNXT-Dev

Thanks for being on top of this and I’m glad we also have a code example to pass around. I really appreciate this 🙂

-Alex


  • Participating Frequently
  • July 23, 2020

Please note this solution is not reliable! I have used it and it will not return all subitem ids for some parent items!!


  • Community Expert
  • July 24, 2020

Hey @amitozalvo ,

that’s interesting. Could you name those parent items. I’m really curious.

Greetings


  • Participating Frequently
  • July 24, 2020

What do you mean by naming them? It’s happening to about 10% of parent items in my board and already reported to Monday which have told me this issue is because subitems API are not ready for production.
This is not a reliable solution as you might miss some subitems when querying them.


  • Community Expert
  • July 24, 2020

I’m trying to reproduce that issue. But I always get all subitems.

How much subitems do you have per Item, because there is a default limit of 25.