We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set header on graphQL for Retrieving Storefront API translations
We can query the supported resources using the Accept-Language HTTP header, to return translated content to the Storefront API.
Accept-Language
Reference: https://shopify.dev/api/examples/i18n-app-translations#retrieving-storefront-api-translations
Issue: I was unable to set the header. My attempt was the following:
$opt = $options->getGuzzleOptions(); $opt = array_merge_multi($opt, ['headers' => ['Accept-Language' => 'fr']]); $options->setGuzzleOptions($opt);
I can see the header is put into _conditional but it does not seem to be passed further.
_conditional
the output is also not showing the header:
[headerNames:GuzzleHttp\Psr7\Response:private] => Array | ( | [date] => Date | [content-type] => Content-Type | [transfer-encoding] => Transfer-Encoding | [connection] => Connection | [x-sorting-hat-podid] => X-Sorting-Hat-PodId | [x-sorting-hat-shopid] => X-Sorting-Hat-ShopId | [vary] => Vary | [referrer-policy] => Referrer-Policy | [x-frame-options] => X-Frame-Options | [x-shopid] => X-ShopId | [x-shardid] => X-ShardId | [x-stats-userid] => X-Stats-UserId | [x-stats-apiclientid] => X-Stats-ApiClientId | [x-stats-apipermissionid] => X-Stats-ApiPermissionId | [x-shopify-api-version] => X-Shopify-API-Version | [content-language] => Content-Language | [strict-transport-security] => Strict-Transport-Security | [x-shopify-stage] => X-Shopify-Stage | [content-security-policy] => Content-Security-Policy | [x-content-type-options] => X-Content-Type-Options | [x-download-options] => X-Download-Options | [x-permitted-cross-domain-policies] => X-Permitted-Cross-Domain-Policies | [x-xss-protection] => X-XSS-Protection | [x-dc] => X-Dc | [nel] => NEL | [report-to] => Report-To | [x-request-id] => X-Request-ID | [cf-cache-status] => CF-Cache-Status | [expect-ct] => Expect-CT | [server] => Server | [cf-ray] => CF-RAY | [alt-svc] => alt-svc | )
The text was updated successfully, but these errors were encountered:
Hi, any solution for this? Thanks.
Sorry, something went wrong.
No branches or pull requests
Unable to set header on graphQL for Retrieving Storefront API translations
We can query the supported resources using the
Accept-Language
HTTP header, to return translated content to the Storefront API.Reference:
https://shopify.dev/api/examples/i18n-app-translations#retrieving-storefront-api-translations
Issue:
I was unable to set the header. My attempt was the following:
I can see the header is put into
_conditional
but it does not seem to be passed further.the output is also not showing the header:
The text was updated successfully, but these errors were encountered: