Publish product to Online Store or POS or both

Hi,

How can we publish product to Online Store or POS?
Our approach till now was to query all the publications, identify the relevant publication id based on publication.name field and use the ids in publishablePublish or publishableUnpublish mutations.

But the field is marked as deprecated, and the provided alternate catalog.title is inconsistent (strangely doesn’t have name in string only for Online or POS channels). Also, the publication ids are different for different accounts.

We would either need to keep using publication.name for identifying the publications of catalog.title needs to be fixed to show the same value as publication.name(even so till then, we may still need to use publicaton.name)

Do we have any alternate?

Similar query was earlier raised. It was suggested we could use app.id, but even app is deprecated.

Thanks in advance