Hi Shopify 
We’re encountering some odd behavior on our development store that has the new market feature enabled.
While trying to determine if a language is available online, we’re going through marketWebPresences and check the root_urls - On 2025-01 this returns the expected data, but if we switch to 2025-04 or higher it begins returning root_urls for markets that have been deleted.
I noticed, we can check through “markets” if the market actually exists, but is this intended behavior? It seems to clutter the data a lot and forces us to make additional checks that seem unnecessary.
Any insight would be appreciated 
We use the query:
{
shopLocales {
locale
primary
published
marketWebPresences {
defaultLocale {
locale
}
subfolderSuffix
rootUrls {
url
locale
}
}
}
}
Kind Regards,
Vera
1 Like
Hey @Vera_Auflauf!
Looking through the changelog this would be expected behaviour
A web presence can now exist without a market and can also be assigned to multiple markets. The field MarketWebPresence.market
is deprecated in favour of MarketWebPresence.markets
, which allows for this expanded functionality.
Hi @KyleG-Shopify
thank you for pointing that out!
That does explain it. Though it still seems like this could clutter the data a lot, if that means a web presence is virtually never deleted.
That does leave me with the question: How can we determine then if any language is actually available online? Would it be correct to go through both the webPresences and domains objects and check on all locales assigned - assuming that a language must be assigned to either a market or a domain?
Thanks Vera.
I want to be sure I fully understand how this will be cluttered and require more checks then necessary.
Would adding the published: true
argument on the shopLocales query help, to only return the published locales (and less clutter as a result)? https://shopify.dev/docs/api/admin-graphql/latest/queries/shopLocales#arguments-published
Hi Kyle,
thank you for your continued feedback!
That’s what we tried, too. But because we tested around with the markets in the beginning, the result contains webPresences of 4 markets that do not exist anymore and are URLs that are not actually available online.
For example, if I use a query like
{
shopLocales(published: true) {
locale
primary
published
marketWebPresences {
markets (first:25) {
nodes {
name
}
}
defaultLocale {
locale
}
domain {
host
}
subfolderSuffix
rootUrls {
url
locale
}
}
}
}
I get a result of 12 unique URLs in total of which 7 are not available online and have no market. (My dev store where we are testing is la-luna-new-markets.myshopify.com in case that helps.)
So, to find out if a language is not only published but actually available online, I’m assuming with should a) filter the webPresences for those with a market only, and b) also take the domains object into consideration and check all domains for their assigned languages. Is that correct or is it possible to have a language available online that is neither attached to a domain nor a market?
Ideally, we would be able to simply loop through the result of shopLocales and have a field that returns all URLs at which that language is available.
Hey Vera,
Thanks for sharing that. I’m consulting with our markets team to see if they have any best practices for working with these new API’s. I’ll update here as soon as I know more.