List of countries using Graphql

List of countries using Graphql

wayforward
Shopify Partner
33 3 4

Hi,

 

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

 

Thanks!

Replies 4 (4)

BSSCommerce-TC
Shopify Partner
214 46 46

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

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


MIDA: Heatmap, Record & Replay |BLOOP Referral Program, Reward |

Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
wayforward
Shopify Partner
33 3 4

this is for storefront.

 

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

BSSCommerce-TC
Shopify Partner
214 46 46

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

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


MIDA: Heatmap, Record & Replay |BLOOP Referral Program, Reward |

Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
wayforward
Shopify Partner
33 3 4

these are languages I guess

wayforward_0-1720586245406.png