Hey @zhlong, the publication ID for the online store above would be "id": "gid://shopify/Publication/77327433900". As for the catalog, is there something specific you’re needing from it that isn’t returned? I want to make sure I fully understand the issue here.
The catalog field works when you add the catalogType: APP filter to your publications query.
Try this updated query to identify your Online Store publication:
{
publications(first: 10, catalogType: APP) {
nodes {
id
catalog {
id
title
... on AppCatalog {
id
title
}
}
}
}
}
This will return publications with their catalog information, where you can identify the Online Store by the catalog title. The catalog titles typically follow the pattern “Channel Catalog [ID] for Online Store” or similar descriptive names that clearly identify the sales channel.
You can also filter by other catalog types like MARKET for international catalogs or COMPANY_LOCATION for B2B catalogs when needed.
Cool, I can got the id now. But the catalog title has no something like “for Online Store“, only “Channel Catalog [id] [uuid]“, so the “catalog.apps.nodes[0].handle“ is needed to determine whether online store or not.
query MyQuery {
publications(first: 1, catalogType: APP) {
nodes {
id
catalog {
id
status
title
... on AppCatalog {
id
status
title
apps(first: 1) {
nodes {
title
handle
}
}
}
}
}
}
}