Manage Sales Channels with Graphql

Solved

Manage Sales Channels with Graphql

DamienD
New Member
7 0 0

Hi All,

 

Is there a way to specify a sales channel for a specific product on the update or create query with GQL ?

 

Thank you !

 

Have a good day.

 

Kind regards.

 

Damien.

Accepted Solution (1)

Huptech-Web
Shopify Partner
896 185 188

This is an accepted solution.

Hi @DamienD 
You can use mutation publishablePublish
Find More here: https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/publishablepublish

mutation publishablePublish($id: ID!, $input: [PublicationInput!]!) {
  publishablePublish(id: $id, input: $input) {
    publishable {
      availablePublicationsCount {
        count
      }
      resourcePublicationsCount {
        count
      }
    }
    shop {
      publicationCount
    }
    userErrors {
      field
      message
    }
  }
}

 Thank you
DP.

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Reply 1 (1)

Huptech-Web
Shopify Partner
896 185 188

This is an accepted solution.

Hi @DamienD 
You can use mutation publishablePublish
Find More here: https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/publishablepublish

mutation publishablePublish($id: ID!, $input: [PublicationInput!]!) {
  publishablePublish(id: $id, input: $input) {
    publishable {
      availablePublicationsCount {
        count
      }
      resourcePublicationsCount {
        count
      }
    }
    shop {
      publicationCount
    }
    userErrors {
      field
      message
    }
  }
}

 Thank you
DP.

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required