$headers = [ 'Content-Type' => 'application/json', ]; if ($accessToken) { $header['X-Shopify-Access-Token'] = $accessToken; } if ($isGraphql) { $header['Content-Type'] = 'application/graphql'; }