Automattic\WooCommerce\Api\Infrastructure

GraphQLControllerBase::get_max_query_depthpublic staticWC 1.0

The maximum nesting depth allowed in a GraphQL query.

Reads the {@see Main::OPTION_MAX_QUERY_DEPTH} store option; falls back to {@see self::DEFAULT_MAX_QUERY_DEPTH} 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_depth(): int;

GraphQLControllerBase::get_max_query_depth() code WC 10.9.1

public static function get_max_query_depth(): int {
	$value = (int) get_option( Main::OPTION_MAX_QUERY_DEPTH, self::DEFAULT_MAX_QUERY_DEPTH );
	return $value > 0 ? $value : self::DEFAULT_MAX_QUERY_DEPTH;
}