Happening now | Shopify Community AMA: User Research with CXL | Ask your questions now!

List of countries using Graphql

List of countries using Graphql

wayforward
Shopify Partner
43 4 6

Hi,

 

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

 

Thanks!

Replies 5 (5)

BSSCommerce-TC
Shopify Partner
225 49 51

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
43 4 6

this is for storefront.

 

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

BSSCommerce-TC
Shopify Partner
225 49 51

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
43 4 6

these are languages I guess

wayforward_0-1720586245406.png

 

wayforward
Shopify Partner
43 4 6

can you share the graphiql query?