Query has depth of 7, which exceeds max depth of 6

Hi ,
When I try to export subitems data along with board and group details , I am getting below error message.
If I skip group or sub item info then I am getting results.
Can you please let me know workaround for this one.

Query has depth of 7, which exceeds max depth of 6.

{
boards(ids: 123) {
id
name
groups{
id
title
items_page(limit: 50) {
cursor
items {
id
name
subitems{
id
name
column_values {
column {
title
}
text
value
}
}
column_values {
column {
title
}
text
value
}
}
}
}
}
}

Thanks & Regards,
Madhu Kolli

You could move the items_page up to board instead of group. Then on each item, include its group items{group{id}}. Then post process the items into the groups. You’d still have groups{id, title} under board, and add all of the items under group.items based on the group ID.

Not ideal but the only way to avoid making multiple queries.

2 Likes

Hi @codyfrisch ,
Thanks for quick reply. Yes, it’s a nice workaround. I am able to export data with below query.

{
boards(ids: 123) {
id
name
items_page(limit: 50) {
cursor
items {
id
name
group {
id
title
}
subitems{
id
name
column_values {
column {
title
}
text
value
}
}
column_values {
column {
title
}
text
value
}
}
}
}
}

Thanks & Regards,
Madhu Kolli

Its a bit of work, but its still going to be faster to restructure locally than making multiple queries would be (from a code performance perspective at least)

1 Like