[GraphQL API] How to validate if variant is available in online store sales channel?

I’m searching the Product Variant GraphQL fields and can’t seem to find a way to simply check if a variant is available in the online store sales channel or not.

Any insight is appreciated, thanks!

It’ll be on 2026-07:

I’ll have to wait then, thanks @Luke!

Wait, how would I use publishedOnPublication to check if it’s on the online store sales channel? It requires a publicationId value to use it. And publications are not the same as a sales channel, or is it?

Hey @Pridentt! A publication is the API representation of a sales channel - you get its ID by running the publications query once, then pass that ID into publicationId.

One other thing worth mentioning is that in the current stable API, publishing is a product-level concept. There’s no per-variant Online Store toggle, so you check the parent product rather than the variant. Either publishedOnPublication for a simple boolean, or resourcePublicationsV2 if you want the full list of channels at once:

query {
  product(id: "gid://shopify/Product/123") {
    publishedOnPublication(publicationId: "gid://shopify/Publication/456")
    resourcePublicationsV2(first: 10, catalogType: APP) {
      edges {
        node {
          isPublished
          publication { id name }
        }
      }
    }
  }
}

@Luke is right that variant-level publishing arrivews in 2026-07. The product and variant publishing guide has more info on variant level publishing.

If your actual goal is to see whether a buyer purchase this variant on the storefront rather than “is the product published”, availableForSale on the variant is the better signal for that.

Hey @Donal-Shopify, thank you for the info.

Just to confirm, when I update to the 2026-07 API version after it’s released, I’d need to:
→ Query publications, for example first 10 because it doesn’t have a query field by title

→ Find the publication which publication.catalog.title equals “Online store” (because publication.name is deprecated). Get this publication.id

→ Finally query ProductVariant publishedOnPublication with the publication.id

Is this correct?

I gave this a go in my test store and it actually turns out catalog.title isn’t “Online Store”. On my test shop it comes back as “Channel Catalog 141579583637 for Online Store”, an auto-generated string, so it’d be better to match on the channel handle instead, which is stable and not localized:

query {
  publications(first: 50, catalogType: APP) {
    edges {
      node {
        id
        channels(first: 1) { nodes { handle name } }
      }
    }
  }
}

You can get the node where channels.nodes.handle equals “online_store” and use that id. If you’d rather match on a display string, channels.name gives you “Online Store”, and unlike publication.name that one isn’t deprecated.

So steps 1 and 3 are spot on, I’d tweak step 3!