FROM CACHE - en_header

Can't query translatebleResources query on graphql through gatsby-source-shopify package

axelmylle
New Member
1 0 0

Hi everyone.

I am currently making a custom storefront and want to include translations.

I'd like to access the translatebleResources query but this is not available at the moment in the graphQL explorer using the gatsby-source-shopify package.

While theShopify GraphiQL App on the store itself does support this..

 

axelmylle_0-1619719963324.pngaxelmylle_1-1619719980035.png

 

 

Replies 3 (3)
CalD
Shopify Staff
Shopify Staff
140 21 33

Hi @axelmylle,

Translatable resources are not directly available through the Storefront API, only the Admin API. The Shopify GraphiQL app on the store will have access to this which is why you can see that returned.

Take a look at this tutorial to retrieve Storefront API translations: https://shopify.dev/tutorials/manage-app-translations-with-admin-api#retrieving-storefront-api-trans...

CalD | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

frogmaz
New Member
2 0 0

Hello! Thank your for your answer, but I'm really puzzled with this. Why can't we reach translations through storefront? Where did the need for an extra step in enabling multilingual website came from? Getting translations should be one of the very basic features... I'm really surprised to see that a platform with as great reputation as Shopify can't make this feature a lot easier to use. 

frogmaz
New Member
2 0 0

Where can I find an example that shows how to apply this code in practice, on my Gatsby website?