Headless Server Developer Manual / Version 2110
Table Of Contents
The higher the complexity of a query is, the higher is the resulting potential load on the server.
The complexity of a query may be limited by a MaxQueryComplexityInstrumentation
which
is provided by the graphql-java
framework.
By default, the complexity of a query is calculated by summing up the number of requested fields and nested levels.
A more sophisticated complexity calculator may be added to the Spring configuration by implementing the
FieldComplexityCalculator
interface from graphql-java
.
Like the query depth, the complexity of a query is calculated before actually invoking the query.
The complexity limit can be enabled by setting the configuration property caas.graphql.max-query-complexity
to a value greater than 0
. The default is 0
which means that this check is disabled.