Focusing on managing products, variants, and collections through the API.
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:
=> #<ShopifyAPI::Clients::HttpResponse:{redacted}
@body=
{"data"=>
{"product"=>
{"resourcePublications"=>
{"edges"=>
[{"node"=>{"publication"=>{"name"=>"Online Store", "id"=>"gid://shopify/Publication/{redacted}", "catalog"=>nil}}},
{"node"=>{"publication"=>{"name"=>"Old Sandbox", "id"=>"gid://shopify/Publication/{redacted}", "catalog"=>nil}}}]}}},
"extensions"=>{"cost"=>{"requestedQueryCost"=>48, "actualQueryCost"=>9, "throttleStatus"=>{"maximumAvailable"=>1000.0, "currentlyAvailable"=>991, "restoreRate"=>50.0}}}},
@CODE=200,
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.
Also experiencing this.
To make things even more interesting, I'm getting some auto-generated names for catalog titles when querying a product's publications. Visible below.
Also having this issue. Has there been an update? I am seeing "Channel Catalog 39xx..." followed by a bunch of alphanumeric when querying for catalog.name