Product Updates

DatoCMS changelog for new features and general improvements
Content Delivery API
Upcoming changes in GraphQL query complexity limit
April 12th, 2023

Our GraphQL service is implementing a new change starting from June 12, 2023. GraphQL requests with a complexity score above 10,000,000 will return an error message. We have worked hard to develop a new algorithm that calculates the complexity score more precisely. It will help us prevent abuses and ensure that our GraphQL service remains fast and efficient for all customers.

The complexity score is calculated based on the number of fields requested and other factors contributing to the computational resources needed to process the query. You can read more about how we generate this score and where to obtain it on the updated doc page.

The maximum complexity score in your plan might be higher than the default. However, we encourage all customers to review their queries and optimize them to reduce their complexity score where possible. You can see what's your plan limit on your dashboard page.

As you know, our GraphQL server returns the HTTP header X-Complexity with the score of the given query. Today we have added a new header named X-Max-Complexity that shows your current plan limit. This pair of headers will help you identify which queries will start to return an error starting from June 12, and thus need a change.

If you have any questions or concerns about this change, please don't hesitate to contact our support team. We appreciate your understanding and cooperation as we make this important change.