updateProduct
Updates an existing product with the provided information.
Authentication Requirements
Requires authentication and 'update_product' permission for the target brand.
Validation Rules
- Product must exist and be accessible to the authenticated user
- SKU must be unique within the brand (if provided)
- Referenced entities (color, size, style, category, parent) must exist
- For product tags: names must be unique, IDs must exist for updates/deletes
Product Tag Operations
Tags support full CRUD operations:
- Create: omit ID, provide name (and optional color/icon)
- Update: provide ID and fields to update
- Delete: provide ID and set delete flag to true
Possible Errors
- **Authentication Error**: User not authenticated or lacks permissions
- **Validation Error**: Invalid data or business rule violations
- **Not Found Error**: Product, references, or tag IDs don't exist
- **Uniqueness Error**: SKU or tag name conflicts
updateProduct(
input: UpdateProductInput!
): Product!
Arguments
updateProduct.input ● UpdateProductInput! non-null input
Parameters for UpdateProduct
Type
Product object
Represents a product in the catalog, including its specifications, pricing, inventory, supplier relationships, and composition details. Products can be base items, kits, components, or non-inventory items.