So cool. You know what. There is ZERO mention of that query point for publications being a thing in the docs, and since silly old me relies on the docs to point me to the stuff of interest, I guess that is why I was assuming publication IDs would surface through some other object.
So I see channels mimic publications, but are different, and so I just await now the V48 of some mutation to release the hounds. Are things messy, mmm, Yes. Do I care, mmm, No. Could I do better, mmm, Yes.
Thanks for the hot tips. I owe you a lemonade.
SO TOTALLY UNCOOL
Access denied for publications field. Required access: `read_publications` access scope. This scope is currently available only to private apps installed on Shopify Plus stores.
I could swear like a sailor here. I am pretty sure the person that thought this was a good idea has no idea how bad of an idea this is. Nothing like another day, another dollar and another Shopify concept busted over thin air.
I am so disappointed, as the boss already knows Shopify is a jalopy in some senses, this will just add to his doubts about this platform, something that has already penetrated my ear drums plenty.
I forgot about that gotcha! That explains the errors I was likely seeing. There were a few others we ran into awhile back that required Plus. IIRC being able to pull the salesperson who rang the sale via the API, being able to correctly calculate Tennessee tiered sales tax (requires an Avalara plug-in only available on Plus), etc.
Being able to publish products to a specific set of sales channels via the API isn't so fancified that it should require an upgraded subscription plan!
Exactly. This is a handicap imposed on us, where the person(s) deciding this policy were either lawyers high on gummy bears thinking "let's protect this aspect of the platform from users so as to piss off as many plebes as we can, hahaha, oh, look, shiny!", or honestly, it is a move designed to protect the platform from errors that could cripple it.
I am going with stoner lawyers. No self-respecting engineer would neuter a most useful aspect of the platform without very good, clear reasons.
The other thing is this. We have always been encouraged from the very top of the top, to add amazing things to Shopify, to dream! To take this platform to heights it cannot achieve on its own. We are loved! They love us!
Then they sit down and use Shopify. And never see the patterns we see. Or the use cases. So of course, it is super easy to be a pencil pusher, and make an executive decision. No normal Shopify App would ever need to iterate the publications of a shop, and therefore be able to turn on or off the visibility of a collection, or products in those publications. Only a super-advanced humanoid can do that, using the mouse and keyboard whilst in the Admin.
And if a Plus shop needs automation there, we can ensure the only App that ever touches that is under our thumb. So no troubles! Carry on peoples. If you want access to publications, it means you're doing something we are not expecting, so now you have to explain yourself, and perhaps even grovel a little to get that sacred scope turned on.
So here I am, surely on the fringes, possibly doing something I have no business doing according to the gospel, but still. The pain remains. I have products in collections that get moved from visible on all sales channels to archived, and when I go to turn them back on, in their respective collections, they are DEAD. Not active, not published, and not on the sales channels they were on. So what is a poor boy to do?