I am trying to retrieve a complete list of sales channels when querying for individual products including the name of the sales channel. I can retrieve the list of sales channels with the following connections:
Product->ResourcePublication->Publication
Product->ResourcePublicationV2->Publication
Currently I can get the name and id of a channel on the Publications type, however the name
field has been deprecated. The docs suggest using Catalog.title as a replacement, however requesting catalog field on publication returns nil for catalog on each channel, and as a result there is no title returned either.
Below is an example query body I have written in Ruby and the response that I receive.
request:
<<~QUERY
query {
product(id: "gid://shopify/Product/#{shopify_product_id}") {
resourcePublications(first: 15){
edges{
node{
publication{
name
id
catalog{
title
}
}
}
}
}
}
}
QUERY
response:
=> #
See `"catalog"=>nil` for each `publication` above.
I believe the response I am getting is correct, meaning there should not be any catalogs because I've never setup or seen 'catalogs' in the store (I use the default dev store setup w/ snowboard product data and don't mess with it after that).
Is there a different way to get a publication (sales channel) name without using the deprecated Publication.name field?
Am I doing something wrong with the catalog query?
Is the catalog field on publications bugged, and should it actually include results with titles?
Any help or information is greatly appreciated, thank you.