Get parent market with currencySettings

Hi everyone,
I’m running into an issue with Market.currencySettings being nullable. In cases where it’s not set, we need to identify the parent market and access its currency information instead.

Is there a way to get the parent market via the Graphql API? I haven’t been able to find anything so far, and this is currently blocking us from releasing an update.

The parent market is clearly visible in the admin UI (see screenshot), so I assume the data is available somewhere.

Any ideas?
Thanks!

Hey @Jan_Ther - right now, there’s not an explicit way to get the parent market via the currencySettings field, but it is something we are aware of being a limitation (there’s a bit more info in this thread here).

I can’t guarantee if/when this data would be made available in the API, but it is something on our radar. I’m going to add your report to the feature request I set up through that other thread though just so we can have that logged officially.

Let me know if I can clarify anything on my end here, happy to help :slight_smile:

Thank you very much.
So there is no way to find out currencySettings for this market(Some hack or something)? That’s why the graphql api is now unusable.

Thank you for your time, hopefully there will be a fix soon :slight_smile:
Best,
Jan

Hi @Jan_Ther! If it can be of any help, what we are doing now in our app for these kinds of scenarios is to use the endpoint MarketsResolvedValues to get the “US” currency and apply it to this market. It is the only workaround we’ve found

1 Like

@senabre Can you share specifically how this workaround could be applied? I don’t think it works but I’d be happy to be proven wrong.

First of all, Jan is not starting from a country code. He is starting from a Shopify market.

There is no guarantee that a Shopify market can be simplified to just a single country.

More importantly, as far as I can see, this query is designed to show the currency which is shown to the customer. This may not match the currency that the market prices are defined in. There are market settings like “Resolve to local currency” where the customer would see the prices in a currency that is definitely not the currency that prices are set in.

For example, in my test store I have an “International” market with a child market of “Columbia”. Columbia currency shows the currencySettings as NULL.

The international market sets fixed prices in USD, and since that is the parent market for Columbia that should be the market currency.

However, when I run this query, I see CAD as the currency.

        query {
            marketsResolvedValues(buyerSignal: {countryCode: CO}) {
                currencyCode
            }
        }

So as far as I can see this is definitely not a reliable workaround. In fact using it as a workaround would be quite dangerous in my use case since my app can change the prices of items, and setting the price in the wrong currency would be a disaster for merchants.

If any Shopify staff want to know my test store, the shop ID is 93381656892