Automattic\WooCommerce\Api\Infrastructure
GraphQLControllerBase::get_max_query_complexity
The maximum computed complexity score allowed for a GraphQL query.
Reads the {@see Main::OPTION_MAX_QUERY_COMPLEXITY} store option; falls back to {@see self::DEFAULT_MAX_QUERY_COMPLEXITY} when the option is unset, empty, or non-positive.
Method of the class: GraphQLControllerBase{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = GraphQLControllerBase::get_max_query_complexity(): int;
GraphQLControllerBase::get_max_query_complexity() GraphQLControllerBase::get max query complexity code WC 10.9.1
public static function get_max_query_complexity(): int {
$value = (int) get_option( Main::OPTION_MAX_QUERY_COMPLEXITY, self::DEFAULT_MAX_QUERY_COMPLEXITY );
return $value > 0 ? $value : self::DEFAULT_MAX_QUERY_COMPLEXITY;
}