As of API v2024-04 ProductVariant is no longer a TranslateableResourceType, you’ll need to look up the product option value id’s instead
On the doc for the TranslateableResourceType Enum, if you change to v2024-01 there’s this deprecation warning on the PRODUCT_VARIANT type:
To get the ID’s you need, you could use a translatableResources query filtering for a resourceType of PRODUCT_OPTION_VALUE. These changes are related to the new product API changes for increased variants.
If I understand this correctly, in our case this will make the translation resource totally useless.
Scenario: Our app print out x packing slips. Let’s say 100. Each with 2 different products.
So either we have to call translatableResources to get all product variants in the store, which could be in the tens of thousand. Or 200 times translatableResource to get option values for all the products.
Each of these is practically impossible regarding time spent and query costs.
Today we collect all the products/variants on these orders, and run mostly one query to get all translations
Something like this:
{
translatableResourcesByIds(first: 10, resourceIds: "list of product and variant ids") {
edges {
node {
resourceId
translations(locale: "en")
{
key
value
locale
}
}
}
}
}