List of countries using Graphql

Hi,

Is there a way to get a list of countries using graphql without using any external API?

Thanks!

Hi @wayforward ,

This might be what you are looking for https://shopify.dev/docs/api/storefront/2024-07/queries/localization

query AllLocalizations @inContext(language: EN) {
  localization {
    availableCountries {
      isoCode
      name
      availableLanguages {
        isoCode
        endonymName
      }
    }
  }
}

this is for storefront.

Looking it for admin - https://shopify.dev/docs/api/admin-graphql/

Hi @wayforward ,

It’s same. Is this what you were looking for? It return a list of available locales.

https://shopify.dev/docs/api/admin-graphql/2024-07/queries/availableLocales

these are languages I guess

can you share the graphiql query?