Automattic\WooCommerce\Vendor\GraphQL\Type

SchemaValidationContext::validateRootTypespublicWC 1.0

Method of the class: SchemaValidationContext{}

No Hooks.

Returns

null. Nothing (null).

Usage

$SchemaValidationContext = new SchemaValidationContext();
$SchemaValidationContext->validateRootTypes(): void;

SchemaValidationContext::validateRootTypes() code WC 10.9.4

public function validateRootTypes(): void
{
    if ($this->schema->getQueryType() === null) {
        $this->reportError('Query root type must be provided.', $this->schema->astNode);
    }

    // Triggers a type error if wrong
    $this->schema->getMutationType();
    $this->schema->getSubscriptionType();
}