Skip to main content

How to easily exhaust complexity budget for testing?

  • August 28, 2024
  • 3 replies
  • 37 views

mtkacz-soldevelo

Hi!
Is there a simple way to lower the complexity limit or quickly exhaust it for testing purposes on my developer account?
For example:

  • a setting in the developer center that would allow me to set limit to lower value
  • a query that would allow me to mock limit (something like mocking the subscription)
  • a clever use of some complex query that would exhaust the limit in one/two runs via developer center API playground.
    or anything that would make the process simple and easily repeatable.

My goal is to test error scenarios in the app that I’m working on. Any suggestions are much appreciated 🙂

3 replies

rob
Forum|alt.badge.img
  • monday.com Partner
  • August 28, 2024

Hey @mtkacz-soldevelo
You can easily reach the complexity limit by querying every item in every board in a loop.

query {
  complexity {
    query
  }
  boards {
    items_page {
      items {
        board {
          items_page {
            items {
              board {
                items_page {
                  items {
                    id
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

  • Participating Frequently
  • August 28, 2024

I would add, that adding subitems to items is a great way to also cause it to grow exponentially.


mtkacz-soldevelo
  • Author
  • Participating Frequently
  • August 29, 2024

Thanks @rob and @anon29275264 for the neat trick. It surely makes testing easier.

I assume though, that there is no elegant way to precisely control the limit, right? As I wrote in examples - mock query or UI setting. Such devtools would be very helpful for developers and testers.