^ TypeError {#371
#message: "GraphQL\Client::__construct(): Argument #1 ($endpointUrl) must be of type string, null given, called in /var/www/html/front/classes/Helpers/ApiQL.php on line 22"
#code: 0
#file: "/var/www/html/front/vendor/gmostafa/php-graphql-client/src/Client.php"
#line: 64
trace: {
/var/www/html/front/vendor/gmostafa/php-graphql-client/src/Client.php:64 {
GraphQL\Client->__construct(string $endpointUrl, array $authorizationHeaders = [], array $httpOptions = [], ClientInterface $httpClient = null, string $requestMethod = 'POST', AuthInterface $auth = null) …
› */
› public function __construct(
› string $endpointUrl,
}
/var/www/html/front/classes/Helpers/ApiQL.php:22 {
Core\Helpers\ApiQL->__construct() …
›
› $this->client = new Client(
› _getenv('API_GQL_URL'),
arguments: {
$endpointUrl: null
$authorizationHeaders: array:2 [ …2]
$httpOptions: array:1 [ …1]
}
}
/var/www/html/front/classes/Services/ShopService.php:125 {
Core\Services\ShopService::lookup(string $slug = null) …
›
› $return = (new ApiQL)
› ->cache(3600, false)
}
/var/www/html/front/classes/Helpers/Shop.php:60 {
Core\Helpers\Shop::getId() …
›
› if ($lookup = ShopService::lookup()) {
› return $lookup['id'];
}
/var/www/html/front/classes/Helpers/Shop.php:25 {
Core\Helpers\Shop::boot($shopId = null, Request $request = null) …
› {
› $shopId = $shopId ?? self::getId();
› $shopDir = BASE_DIR . '/shop/' . $shopId;
}
/var/www/html/front/classes/Middlewares/AppMiddleware.php:43 {
Core\Middlewares\AppMiddleware->process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface …
›
› Shop::boot(request: $request);
›
arguments: {
$shopId: null
$request: Slim\Psr7\Request {#393 …}
}
}
/var/www/html/front/vendor/slim/slim/Slim/MiddlewareDispatcher.php:177 {