publishablePublish invalid id

sanabns
New Member
11 0 0

doing the publishablePublish results to invalid id error...

 

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

 

 

and the variables...

 

{
    "id": "gid://shopify/Product/[id]",
    "input": {
        "publicationId": "gid://shopify/Channel/[id]"
    }
}

 

I've tested it with postman and the result is this...

sanabns_0-1603214067906.png

 

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 225

I don't see what API version you are calling, but the Channel ID appears to now be deprecated. So your input query variable should define the Publication ID instead I believe.

https://shopify.dev/docs/admin-api/graphql/reference/mutation/publishablepublish

Hope this helps!

0 Likes
sanabns
New Member
11 0 0

yeah, I'm actually using the publicationId not the channelId

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 225

But you aren't using that in the GID URI though...shouldn't this be ...shopify/Publication/{id}?

"publicationId": "gid://shopify/Channel/[id]"
0 Likes
HunkyBill
Shopify Expert
4472 45 484

Does any of that stuff work live for real? I thought they were still trying to figure out that publishPublishPublishable endpoint... we cannot even get scopes on that yet? Or is that now live and all working?

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
sanabns
New Member
11 0 0

I did changed it afterwards but I still got the same result, thanks.. but anyway I just decided to use the REST API since that seems to be more stable and detailed than the GraphQL

0 Likes