Getting: Field 'shopLocales' doesn't exist on type 'QueryRoot' when trying to retrive locale

Shopify Partner
2 0 0

Hi, 

i want to translate content of my website to allow multilan natively on my store so i start following the doc but when i am trying to get current locale or enable locale i get error message that say the requested mutation or field does not exist 

i.e for the query (following https://help.shopify.com/en/api/guides/shop-locales#retrieve-a-shops-locales

 

{
  shopLocales {
    locale
    primary
    published
  }
}

i am getting 

{
  "errors": [
    {
      "message": "Field 'shopLocales' doesn't exist on type 'QueryRoot'",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "query",
        "shopLocales"
      ],
      "extensions": {
        "code": "undefinedField",
        "typeName": "QueryRoot",
        "fieldName": "shopLocales"
      }
    }
  ]
}

i already checked that i have the write and read translation access and i am using the 2019-07 (latest) API version

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
472 35 90

Hi @steven_athouel,

 

Currently the query object ShopLocales is only available in the unstable version of the API.  If you update your url to use "unstable" instead of "2019-07" your query should succeed.

 

The guide should mention this and I will request that it be updated.

 

Cheers,

Ryan

Developer Experience @ Shopify
0 Likes