localizationExtensions through GraphQL API

Shopify Partner
5 0 3

I'm currently trying to utilize the GraphQL and localizationExtensions in our app, to get the PCCC number from checkout.

https://shopify.dev/tutorials/get-a-country-field-using-localization-extensions

 

I'm currently being met with the following error:

Field 'localizationExtensions' doesn't exist on type 'Order'

 

With the query below:

 

{
    order(id: "gid://shopify/Order/2897799184539") {
        id
        localizationExtensions(first: 5) {
            edges {
                node {
                    countryCode
                    purpose
                    title
                    value
                }
            }
        }
    }
}

 

What am i doing wrong here?

 

0 Likes
Shopify Partner
5 0 3

Issue is resolved when typing the specific API version in the requesting URL like so:

https://{shop_url}/api/2020-10/graphql.json

 

Using a private app token, with the 2020-10 API version specified, is not sufficient

0 Likes