Retrieving sales channel names from product publications resource

tvh
Shopify Partner
1 0 1

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.

Replies 0 (0)