Get translation of ProductOption

Solved
Beatroot
Tourist
5 1 1

I'm trying to get the translation of a ProductOption via GraphQL. 'Size', 'Color' etc.  The options are translated, but i don't find a way to formulate the Query. This is one try i got: (ProductOption type should exist in "unstable" version)

{
  ProductOption(id: "gid://shopify/ProductOption/5762796322927") {
    name
  }
}

Version is set to "unstable". I've also tried to return it in product, variant etc., no luck so far. Any ideas? 

0 Likes
SBD_
Shopify Staff
Shopify Staff
1044 141 185

This is an accepted solution.

Hey @Beatroot 

 

Try something like this instead:

 

{
  node(id:"gid://shopify/ProductOption/...") {
    id
    ... on ProductOption {
      id
      name
      position
      translations (locale: "en") {
        key
        value
      }
      values
    }
  }
}

Or via product.options:

 

{
  product(id: "gid://shopify/Product/12345") {
    options {
      translations(locale:"...") {
        key
        value
      }
    }
  }
}