How to get all translations at once? translations(locale: "..")

Solved
Beatroot
Tourist
5 1 1

Hi all!

 

is it possible, to request all translations of a node at once (using GraphQL)?  Currently i'm using this to get all variants and i have to loop over all shop-languages to get all languages. It would make the flow and code quite a bit straight forward if i could simple get all languages in the translations (i can even name them, but so far nothing seems to work):

 

{
  product(id: "gid://shopify/Product/xxxxx") {
    id
    variants(first: 100) {
      edges {
        node {
          id
          sku
          title
          price
          inventoryQuantity
          translations(locale: "de") {
            key
            locale
            value
          }
        }
      }
    }
  }
}

 

0 Likes
Beatroot
Tourist
5 1 1

This is an accepted solution.

0 Likes