NO_INVENTORY_QUANTITIES_ON_VARIANTS_UPDATE

mkjacc1
Tourist
12 0 0

I'm about changing item inventory to absolute quantity for bulk variables of one product, but it returns the error "NO_INVENTORY_QUANTITIES_ON_VARIANTS_UPDATE".

any solution?

API Version: 2021-07 (release candidate)

Mutation

mutation productVariantsBulkUpdate($variants: [ProductVariantsBulkInput!]!, $productId: ID!) {
  productVariantsBulkUpdate(variants: $variants, productId: $productId) {
    product {
      id
    }
    productVariants {
      id
      price
      inventoryQuantity
      inventoryItem {id
        unitCost{
          amount
        }
      }
      
    }
    userErrors {
      code
      field
      message
    }
  }
}

 

Variables

{
  "productId": "gid://shopify/Product/6575677997189",
  "variants": [
    {
    "id": "gid://shopify/ProductVariant/39421131751557",
    "price": "7.99",
    "inventoryQuantities": {"availableQuantity": 8, "locationId": "gid://shopify/Location/39034716293"},
    "inventoryItem": {"cost": 10.99}
    }
  ]
}

 

0 Likes