npm package: @matixinc/gatsby-theme-shopify-netlify-cms
Description: query retrieveLocaleFromProduct {   translatableResource(resourceId: "gid://shopify/Product/6604308545716") {     resourceId     translatableContent {       key       value       digest       locale     }     translations(locale: "fr") {       
Latest version: 1.0.1


  # translatableResources(resourceType:PRODUCT, first:10){
  #   edges{
  #     node{
  #       resourceId
  #       translations(locale:"fr"){
  #         key
  #         locale
  #       }
  #     }
  #   }
  # }
  


  # shop {
  #   name
  #   collections(first:5) {
  #     edges {
  #       node {
  #         description
  #         products(first:5) {
  #           edges {
  #             node {
  #               handle
  #              priceRangeV2{
  #               minVariantPrice{
  #                 amount
  #                 currencyCode
  #               }
  #             }
  #               description
  #             }
  #           }
  #         }
  #       }
  #     }
  #   }
  # }
  
  
# retrieve content hash of original translation
query retrieveLocaleFromProduct
{
  translatableResource(resourceId: "gid://shopify/Product/6604308545716") {
    resourceId
    translatableContent {
      key
      value
      digest
      locale
    }
    translations(locale: "fr") {
      key
      value
      locale
    }
  }
}

# enabling locale for a shop (has to be done once at)

mutation enableLocale($locale: String!) {
  shopLocaleEnable(locale: $locale) {
    shopLocale {
      locale
      name
      published
    }
  }
}

mutation CreateTranslation($id: ID!, $translations: [TranslationInput!]!) {
  translationsRegister(resourceId: $id, translations: $translations) {
    userErrors {
      message
      field
    }
    translations {
      locale
      key
      value
    }
  }
}






{
  "locale": "en",
  "id": "gid://shopify/Product/6604308545716",
  "translations": [
   
       {
      "key": "title",
      "value": "Event",
      "locale": "en",
      "translatableContentDigest": "f7d84a333959a011090efe26a54c1c2335b0cae14c93331f38c11f8390d06421"
    }
   
  ]
}


{
  "data": {
    "translatableResource": {
      "resourceId": "gid://shopify/ProductVariant/39827410714800",
      "translatableContent": [
        {
          "key": "title",
          "value": "couleur_blanc / taille_10-13 / type-col_v",
          "digest": "5eebce442d4a5eec6cf071e34e11d94582fcfe5d3e83766ccb6b61eae2e65c1e",
          "locale": "en"
        },
        {
          "key": "option1",
          "value": "couleur_blanc",
          "digest": "3625c8f51ae7b6d11e9856591fa7cdf10000a243bde7fd766e338fbce684f600",
          "locale": "en"
        },
        {
          "key": "option2",
          "value": "taille_10-13",
          "digest": "430b1f8c6cbe9a1e0bc89e4c98176240d8e6a63277a3a878abf290c127f91343",
          "locale": "en"
        },
        {
          "key": "option3",
          "value": "type-col_v",
          "digest": "58b24abb0a1dc22bda17b7095485f46f5a9d4af84b454b1de9e12c49024e45e9",
          "locale": "en"
        }
      ],
      "translations": []
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 3,
      "actualQueryCost": 3,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 997,
        "restoreRate": 50
      }
    }
  }
}