I am trying to run a quick query on python trying to fetch a lot of subitem information. Then I get the following error:
{'errors': [{'message': 'Query has complexity of 11010020, which exceeds max complexity of 5000000', 'extensions': {'code': 'maxComplexityExceeded', 'complexity': 11010020, 'maxComplexity': 5000000}}], 'extensions': {'warnings': [{'message': 'Replaced by Board.items_page in 2023-10', 'locations': [{'line': 4, 'column': 9}], 'path': ['query', 'boards', 'items'], 'extensions': {'code': 'deprecatedField', 'typeName': 'Board', 'fieldName': 'items'}}]}, 'account_id': 16336358}
The query is:
query = f’‘’
query{{
boards(ids: board_id){{
items{{
subitems{{
column_values{{
title
}}
}}
}}
}}
}}
‘’’
And the script is as simple as this:
import requests
import pandas as pd
import os
import json
api_key = api_key
url = f'https://api.monday.com/v2'
headers = {
'Authorization': api_key
}
query = query (above)
response = requests.post(url, headers=headers, json={'query': query})
rjson = response.json()
print(rjson)
Obviously it fails on the response.
Is it possible to get this items?
The idea is to create some dataframes with pandas and toy with the information.