Skip to main content

Get subtask fields from gql api

  • January 19, 2024
  • 3 replies
  • 198 views

Hello.
I am trying to fetch an item along with its subtasks and their column values. Currently, this does not seem to be supported
Is there a way in which I can fetch the subitems’ column values along with its parent in the same query?

3 replies

basdebruin
  • Community Expert
  • January 19, 2024

hi @gmahima

With the ... on SubtaskValue fragment you can retrieve data in the subitems column (in the parent), such as the settings_str that gives you the board where the subitems live.

To get to the subitems and their column values try something like this

{
  boards(ids: [4738294968]) {
    items_page {
      items {
        id
        column_values {
          id
          text
          column {
            title
          }
        }
        subitems {
          column_values {
            value
          }
        }
      }
    }
  }
}

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • January 21, 2024

Thank you @basdebruin !!!


  • Author
  • New Participant
  • January 23, 2024

@basdebruin That works! Thank you