Complexity

Query complexity defines the cost of each operation you make. This cost is used when determining an account's API usage with respect to our rate limiting.

Complexity queries

The fields in this section will allow you to determine the complexity cost of your queries as you make them. For more information about our rate limits, check out this article: Rate Limits. You can only use complexity at the root of your query. It cannot be nested within another query.

You can also find the Postman request to get the complexity points of your query here.

query {
    complexity {
        query
        after
    }
    users(kind: non_guests) {
        id
        name
    }
}

mutation {
  complexity {
    query
    before
    after
  }
  create_item(board_id:12345, item_name:"test item") {
    id
  }
}
let query = "query { complexity { query after } users(kind: non_guests) { id    name } }";
let mutation = "mutation { complexity { query before after } create_item(board_id: 12345, item_name: \"test\") { id }}";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));


fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     query : mutation
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));

Fields

The following fields will determine what information is returned from your complexity queries.

FieldDescription
after Int!The remaining complexity after the query's execution.
before Int!The complexity before the query's execution.
query Int!This specific query's complexity.
reset_in_x_seconds Int!How long (in seconds) before your complexity budget is reset.

📘

Have questions?

Join our developer community! You can share your questions and learn from fellow users and monday.com product experts.

Don’t forget to search before opening a new topic!