src/Query/Controller/QueryController.php
public function post(Request $request, $entity)
    {
        try {
            $get = $this->client->get($request->getSchemeAndHttpHost().'/'.$entity, [
                'headers' => [
                    'accept' => $request->headers->get('accept'),
                    'content-type' => $request->headers->get('content-type'),
                    'authorization' => $request->headers->get('authorization')
                ],
                'query' => $request->query->all(),
                'body' => $request->getContent()
            ]);
        } catch (ClientException $exception) {
            throw new UnexpectedValueException('Query did not execute successfully.');
        }

        $response = new Response((string) $get->getBody());
        $response->headers->set('content-type', $request->headers->get('content-type'));

        return $response;
    }
public function post(Request $request, $entity)
    {
        try {
            $get = $this->client->get($request->getSchemeAndHttpHost().'/'.$entity, [
                'headers' => [
                    'accept' => $request->headers->get('accept'),
                    'content-type' => $request->headers->get('content-type'),
                    'authorization' => $request->headers->get('authorization')
                ],
                'query' => $request->query->all(),
                'body' => $request->getContent()
            ]);
        } catch (ClientException $exception) {
            throw new UnexpectedValueException('Query did not execute successfully.');
        }

        $response = new Response((string) $get->getBody());
        $response->headers->set('content-type', $request->headers->get('content-type'));

        return $response;
    }
public function post ( Request $ request , $ entity ) { try { $ get = $ this -> client -> get ( $ request -> getSchemeAndHttpHost ( ) . '/' . $ entity , [ 'headers' => [ 'accept' => $ request -> headers -> get ( 'accept' ) , 'content-type' => $ request -> headers -> get ( 'content-type' ) , 'authorization' => $ request -> headers -> get ( 'authorization' ) ] , 'query' => $ request -> query -> all ( ) , 'body' => $ request -> getContent ( ) ] ) ; } catch ( ClientException $ exception ) { throw new UnexpectedValueException ( 'Query did not execute successfully.' ) ; } $ response = new Response ( ( string ) $ get -> getBody ( ) ) ; $ response -> headers -> set ( 'content-type' , $ request -> headers -> get ( 'content-type' ) ) ; return $ response ; }
Query endpoint

@Route(path="/{entity}/query", methods={"POST"})
@param \Symfony\Component\HttpFoundation\Request $request
@param string $entity
@return \Symfony\Component\HttpFoundation\Response
Query endpoint