We are trying to retrieveAll Team object but it is failing with query complexity issue.
Query is below :
{
teams {
id
name
picture_url
users {
birthday
country_code
created_at
current_language
email
enabled
encrypt_api_token
id
is_admin
is_guest
is_pending
is_verified
is_view_only
join_date
location
mobile_phone
name
phone
photo_original
photo_small
photo_thumb
photo_thumb_small
photo_tiny
sign_up_product_kind
time_zone_identifier
title
url
utc_hours_diff
}
}
}
Getting error : {“errorDetail”:“{“errors”:[{“message”:“Query has complexity of 28013010, which exceeds max complexity of 5000000”}],“account_id”:11771408,“statusCode”:400}”}
Currently instance is having sample data with 7 teams and 9 users
on 30th of September we successfully got response with total 7 teams and 9 users. but now showing Query complexity issue.
How we can avoid the issue with query complexity to retrieve the same data as above.
One possibility is to retrieve all teams first and then loop through each of the teams to get the users. Alternatively you can retrieve only the userId’s from each team (leaving out all the other fields) and loop through the users to get the details. Do you really need all the details (like the photo in 5 different formats)?
Hi @basdebruin , could we get any insight on complexity of Teams object, whether there was any complexity change in API , since this above query worked fine before 30th Sep.