# @matixinc/gatsby-theme-shopify-netlify-cms

> query retrieveLocaleFromProduct { translatableResource(resourceId: "gid://shopify/Product/6604308545716") { resourceId translatableContent { key value digest locale } translations(locale: "fr") {

Latest version **1.0.1** (published 2021-09-21) · 0 weekly downloads

## Install

```sh
npm install @matixinc/gatsby-theme-shopify-netlify-cms
pnpm add @matixinc/gatsby-theme-shopify-netlify-cms
yarn add @matixinc/gatsby-theme-shopify-netlify-cms
bun add @matixinc/gatsby-theme-shopify-netlify-cms
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-09-21 |
| First published | 2021-09-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | guibulator |

## Links

- npm: https://www.npmjs.com/package/@matixinc/gatsby-theme-shopify-netlify-cms
- npm.io page: https://npm.io/package/@matixinc/gatsby-theme-shopify-netlify-cms

## Recent versions

- 1.0.1 (latest) — 2021-09-21
- 1.0.0 — 2021-09-20

## README

# 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
      }
    }
  }
}

---
_Source: https://npm.io/package/@matixinc/gatsby-theme-shopify-netlify-cms · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
