publishablePublish invalid id

Highlighted
New Member
10 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
Highlighted
Shopify Partner
654 46 131

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
Highlighted
New Member
10 0 0

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

0 Likes
Highlighted
Shopify Partner
654 46 131

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
Highlighted
Shopify Expert
4262 32 434

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
Highlighted
New Member
10 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