There is a graphql query which returns all publications. Particularly, I’m interested in the Online Store publication since I want to publish some products there programmatically.
How can I tell when I get the list of nodes, which is which?
query {
publications(first: 250, catalogType: APP) {
edges {
node {
id
catalog {
id
title
status
}
name
}
}
}
}
In addition, the documentation says that publication.name
is deprecated and publication.catalog.title
should be used instead. However, I found out (in the hard way), that the value is not consistent. On some shops, the catalog title contains the publication names, on others it doesn’t.
For example, this is a result:
{
"id": "gid://shopify/Publication/<id1>",
"catalog": {
"id": "gid://shopify/AppCatalog/<id2>",
"title": "Channel Catalog <id3> <uuid>",
"status": "ACTIVE"
},
"name": "Online Store"
}
How can I identify that this particular publication is the right one for my Online Store channel?