Automattic\WooCommerce\Api\Infrastructure

GraphQLControllerBase::get_engine_schemaprivateWC 1.0

Build and cache the engine-typed GraphQL schema used internally to serve requests. Kept private to keep the engine type out of the controller's public surface; consumers should reach SchemaHandle{} through {@see self::get_schema()} instead.

Method of the class: GraphQLControllerBase{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->get_engine_schema(): Schema;

GraphQLControllerBase::get_engine_schema() code WC 10.9.1

private function get_engine_schema(): Schema {
	if ( null === $this->schema ) {
		$this->schema = $this->build_schema();
	}
	return $this->schema;
}