ProductAttributeWorkflowEvents and ProductAttributeValueWorkflowEvents from @mercurjs/core/workflows.
Attribute events
Each event fires once per attribute, with that attribute’s id as the payload.Value events
Each event fires once per value, with that value’s id as the payload.What doesn’t emit
Some writes create or change records without a matching event:- Values created with an attribute:
createProductAttributesWorkflowemits onlyproduct-attribute.created, not a value event per value - Upserts:
upsertProductAttributeValuesWorkflowemits nothing - Attaching and detaching: linking values to a product,
textandunitvalues created on attach, and option changes on a product emit no attribute events
Subscribe to an event
A subscriber receives one event per attribute. Resolvequery to load the record by id.
src/subscribers/product-attribute-created.ts