Error-Invalid Id while syncing a product to a channel

Highlighted
New Member
1 0 0

Hi ,  I am trying to sync a product from shopify to a sales channel using graphQL but it always gives an error saying invalid ID. But I checked both ,the channel id and the product ID,  are correct. Below is a code snippet. Can anyone suggest something ?

mutation publishablePublish {
    publishablePublish(
        id: "gid://shopify/Product/[ProductID]",
        input: [
          {
            publicationId : "gid://shopify/Apps/[ChannelID]" 
          }
        ]
    ) {
        publishable {
            availablePublicationCount
            publicationCount
            publishedOnCurrentPublication
        }
        shop {
            id
        }
        userErrors {
            field
            message
        }
    }
}

 

0 Likes