Automattic\WooCommerce\Vendor\GraphQL\Server

StandardServer::processPsrRequestpublicWC 1.0

Executes PSR-7 request and fulfills PSR-7 response.

See executePsrRequest() if you prefer to create response yourself (e.g. using specific JsonResponse instance of some framework).

Method of the class: StandardServer{}

No Hooks.

Returns

ResponseInterface|Promise.

Usage

$StandardServer = new StandardServer();
$StandardServer->processPsrRequest( $request, $response, $writableBodyStream );
$request(RequestInterface) (required)
.
$response(ResponseInterface) (required)
.
$writableBodyStream(StreamInterface) (required)
.

StandardServer::processPsrRequest() code WC 11.0.1

public function processPsrRequest(
    RequestInterface $request,
    ResponseInterface $response,
    StreamInterface $writableBodyStream
) {
    $result = $this->executePsrRequest($request);

    return $this->helper->toPsrResponse($result, $response, $writableBodyStream);
}