需要 write_publications 权限点。
接口访问需要令牌,具体如何获取令牌请参考:身份认证
将资源发布到当前渠道。如果资源是商品,只有在商品状态为活动时才会在渠道中可见。仅限订阅销售的商品(requiresSellingPlan: true)只能在在线商店发布。
Arguments
id ● ID!non-null
需要创建或更新发布的资源。
Returns
shop ● Shop!non-null
表示用户商店的对象。
userErrors ● [UserError!]!non-null
执行过程中发生的错误列表。
错误码
关于更多通用错误码说明,请参考:状态码和错误码
Example
将资源发布到当前渠道
mutation PublishablePublishToCurrentChannel {
publishablePublishToCurrentChannel(
id: "gid://shopline/Product/16055271775622479314742093"
) {
userErrors {
field
message
}
}
}
Response
{
"data": {
"publishablePublishToCurrentChannel": {
"userErrors": []
}
}
}
这篇文章对你有帮助吗?

Error loading component.

Error loading component.