Bill of Materials
A Bill of Materials (BOM) defines the components and quantities needed to manufacture a product variant.
Available fields
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
label | String | BOM name. |
description | String | Optional description. |
active | Boolean | Whether this BOM is active. |
is_default | Boolean | Whether this is the default BOM for the variant. |
variant_id | Int | ID of the product variant. |
company_id | Int | Company ID. |
created_at | DateTime | Creation timestamp. |
updated_at | DateTime | Last update timestamp. |
deleted_at | DateTime | Soft delete timestamp. |
variant | Variant | Associated product variant. |
components | [BillOfMaterialComponent] | List of components. |
BillOfMaterialComponent
BillOfMaterial
Returns a single bill of materials by id.
query GetBillOfMaterial($id: ID!) {
BillOfMaterial(id: $id) {
id
label
description
active
is_default
variant_id
created_at
updated_at
variant {
id
label
}
components {
id
quantity
weight
component {
id
label
}
}
}
}BillOfMaterials
Returns a paginated list of bills of materials with sorting and filters.
query BillOfMaterials(
$variant_id: ID
$active: Boolean
$is_default: Boolean
$orderBy: [QueryBillOfMaterialsOrderByOrderByClause!]
$where: QueryBillOfMaterialsWhereWhereConditions
) {
BillOfMaterials(
variant_id: $variant_id
active: $active
is_default: $is_default
orderBy: $orderBy
where: $where
) {
id
label
active
is_default
variant_id
created_at
variant {
id
label
}
}
}Filters
The following fields can be used in the where parameter:
id, label, active, is_default, variant_id, component_variant_id, created_at, updated_at.
