I have a private app with all Admin API permissions enabled (and the Storefront API). For some reason, I am unable to retrieve anything related to publications via the GraphQL Admin API. See the following request and response:
API access to publications via GraphQL is currently gated behind access to product listings. However, product listing permissions are also only available to sales channels, which private apps cannot be.
Is it the online store that you need to publish to, by chance?
The basic outline of the problem is that we have a private app with Storefront API enabled which creates a sales channel under âProduct availabilityâ when editing products. When we are retrieving stuff on the client-side via the Storefront API it is scoped by that sales channel. However, retrieving things via the GraphQL Admin API has no scoping, as you would expect, but we would like to retrieve the channel availability information on individual products or use it when retrieving products. The outcome being that we can apply the same sales channel scoping to our GraphQL Admin API queries.
I can definitely see the confusion here, and enabling access to the Storefront API when the feature was brand new actually did grant sales-channel-like permissions to private apps. That isnât the case anymore though.
The behaviour youâre seeing right now is meant to allow you to show/hide certain products or collections from your Storefront API app, but doesnât make your private app a true sales channel either.
Given that it does allow your app to act as a publication though, I do agree that it should grant publication access. I recently created a request to open up publication access to apps with product permissions instead of sales channels with product listing access, so I will add Storefront API apps to the list as well.
+1 - We are currently experiencing the same issue would be nice to be able to specify just returning the products from current âPrivate Appâ, one work around Iâve found is to âpublishedOnCurrentPublicationâ to the data requested and then filter by that after.
Nothing beats basing your entire solution to a problem on documentation being at least a bit correct.
But no, hours of work wasted because private apps are not allowed to access their own publication channel.
Should I create a public app instead and price it at 5000$ per month, so that no one will buy it?
Also, this problem should take around an single man-hour to fix. I guess a year is not enough to squeeze that in..
Iâm sorry but this is BS, IMHO⌠the REST API lets you see if a product is published on a given channel (or âpublicationâ) without needing to have a Shopify Plus subscription. For example, I have some products that are only available on POS and some products that are only available in the online store. I canât use âACTIVEâ or âDRAFTâ settings (obviously), and with the REST API I could see if a given product was visible on POS or on the online store or both. But with GraphQL, I canât get that info since my shop is not âShopify Plusâ. So now I need to do a mixture of GraphQL and REST; if the REST API is ever retired without this being fixed, Iâm in serious trouble!