Skip to main content

Retrieving Mirror Items Values

  • September 17, 2024
  • 4 replies
  • 35 views

When sending this query to the API

**query($boardId:[ID!], $groupId:[String], $limit: Int!) {
boards (ids: $boardId) {
groups (ids: $groupId) {
items_page (limit: $limit){
cursor
items {
id
name
column_values {
… on MirrorValue {
display_value
id
}

                                        }
                                    }
                                }
                            }
                        }        
                    }**

I get Complexity Budget Exhausted error both in sandbox and production environments.

I am trying to retrieve mirror items values.

Running this query on the API playground there’s no complexity budget exhausted error.

The limit is 200. I tried limits of 2, 5, 10, 50, 100 and even 1 still get the complexity budget exhausted error.

Has anything changed when it comes to retrieve mirror items values?

4 replies

rachelatmonday
Forum|alt.badge.img
  • monday.com Team Member
  • September 17, 2024

Hi @WandileNxu,

A few follow-up questions:

  1. Are you making any other calls within the same 60 seconds?
  2. What specifically are you trying to retrieve with this query? I’m trying to determine if there might be a more efficient way to do it.
  3. Are you checking the complexity of each query?

Best,
Rachel


  • Participating Frequently
  • September 18, 2024

The issiue is you are running items_page within groups instead of boards.

Using it within groups will result in the complexity growing drastically as it multiplies it by all of the groups specified (and 1000X if don’t specify specific group ids)

If you want to display your items by group, I advise returning the group as part of the items, and then grouping them into groups on the client side. you can return all of the groups within boards (with items_page also in the board, but not in groups) to get the structure to process the items into.


  • Author
  • New Participant
  • November 20, 2024

Silly mistake 🙃 there was a typo with the argument name and just like that got fixed.


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

Those are the best and worst mistakes because they are easily solvable but man, we wish we saw it before 🙃