Skip to main content

productVariantsBulkCreate and productVariantsBulkUpdate mutations now validate inventoryQuantities limits

What's changing?

The productVariantsBulkCreate and productVariantsBulkUpdate mutations now enforce validation limits on inventory quantities as part of supporting the increased variant limit from 100 to 2048 variants per product.

Input Validation Limits

With the increase in maximum variants per product from 100 to 2048, the mutation now enforces a maximum limit of 50,000 inventory quantities across all variants in a single mutation. This ensures reliable performance when managing products with many variants across multiple locations.

Error response example

{
  "data": {
    "productVariantsBulkCreate": {
      "userErrors": [{
        "code": "INVENTORY_QUANTITIES_LIMIT_EXCEEDED",
        "field": ["variants"],
        "message": "Input contains 51200 inventory quantities, which exceeds the limit of 50000"
      }],
      "product": null
    }
  }
}

Why are we making this change?

Support for 2048 Variants

  • Increased variant limit: Products can now have up to 2048 variants (previously 100)
  • Reliable execution: Ensures consistent performance when managing complex products

Handling Large Inventory Updates

If you hit the 50,000 inventory quantity limit, you have several options:

  1. Batch your operations: Split large operations into multiple smaller mutations
  2. Use inventorySetQuantities: For updating inventory across many locations, use the inventorySetQuantities
  3. Use bulk mutations: For very large datasets, consider using bulk mutation operations

Related Changes

Was this section helpful?