close

Filter

loading table of contents...

Headless Server Developer Manual / Version 2207

Table Of Contents

3.5.4 Limiting the Complexity of a GraphQL Query

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.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.