Automattic\WooCommerce\Vendor\GraphQL\Server

StandardServer::handleRequestpublicWC 1.0

Parses HTTP request, executes and emits response (using standard PHP header function and echo).

When $parsedBody is not set, it uses PHP globals to parse a request. It is possible to implement request parsing elsewhere (e.g. using framework Request instance) and then pass it to the server.

See executeRequest() if you prefer to emit the response yourself (e.g. using the Response object of some framework).

Method of the class: StandardServer{}

No Hooks.

Returns

null. Nothing (null).

Usage

$StandardServer = new StandardServer();
$StandardServer->handleRequest( $parsedBody ): void;
$parsedBody(OperationParams|array)
.
Default: null

StandardServer::handleRequest() code WC 10.9.1

public function handleRequest($parsedBody = null): void
{
    $result = $this->executeRequest($parsedBody);
    $this->helper->sendResponse($result);
}