How do I get Subitems column with new API?

With the new API - how do I return the contents of the subitems column? My old query does - but haven’t worked out how to update the new query?

OLD: query { boards(ids: " & Board & ") { items { id, name, updated_at, group { title }, columns: column_values { title, text } } } }

NEW: column is empty…
query { boards(ids: " & Board & ") {items_page (limit: 500) {items {id, name, updated_at, group {title} column_values {column{title} text …on MirrorValue {display_value} …on BoardRelationValue {display_value}}}}}}

image

1 Like

Hi @Demmo :wave:

This isn’t my personal area of expertise, however, I have found the API reference documents useful in the past. You can check out what they have to say about Subitems and the API queries here, I hope that is as helpful for you as it is for me!

Best of luck :slight_smile:

Peta | upstream
peta@upstreamtech.io
+613 9067 5611

I think this is a regression. They didn’t implement the display_value for this to return it.

@rachelatmonday this looks to be a regression, there is no ... on SubtasksValue { display_value} to return a text value of the names of all subitems. I suspect this is an easy fix, since the logic is very close to that of BoardRelationValue.

@Demmo as a workaround you can do

items {
  subitems {
    name
  }
}

Then you’ll have the subitems array, which you should be able to map the name field to it a new array, then join with commas to get the string. Annoying, but possible assuming you’re working with a language that will permit this kind of work.

1 Like

Thanks @codyfrisch! Looking into it now.

1 Like