【发布时间】:2021-06-18 10:59:29
【问题描述】:
我正在尝试一次批量更新多个产品变体的价格。 I'm just copying the "interactive" example from Shopify's page
我所做的只是复制并粘贴代码并输入我自己的 ID。当然它不起作用。
看起来像这样:
mutation productVariantsBulkUpdate($variants: [ProductVariantsBulkInput!]!, $productId: ID!) {
productVariantsBulkUpdate(variants: $variants, productId: $productId) {
product {
cursor
}
productVariants {
cursor
}
userErrors {
code
field
message
}
}
}
使用这样的变量:
{
"variants": [
{
id: "gid://shopify/ProductVariant/39369514385591",
price: "50.00"
}
],
"productId": "gid://shopify/Product/6591908577463"
}
我收到此错误:
Variables are invalid JSON: Unexpected token i in JSON at position 30.
【问题讨论】:
标签: graphql shopify shopify-api