Total Complexity | 2 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
13 | final class GraphQLHandler implements RequestHandlerInterface |
||
14 | { |
||
15 | public function __construct(private readonly Server $server) |
||
|
|||
16 | { |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Process an incoming server request and return a response, optionally delegating |
||
21 | * to the next middleware component to create the response. |
||
22 | */ |
||
23 | public function handle(ServerRequestInterface $request): ResponseInterface |
||
24 | { |
||
25 | $response = $this->server->execute($request); |
||
26 | |||
27 | return new JsonResponse($response); |
||
28 | } |
||
29 | } |
||
30 |