query.graph. The Product Edit module has one link, to Medusa’s Product module.
Product to product changes
A read-only link that lists a product’s changes under thechanges alias. It’s defined in packages/core/src/links/product-change-link.ts.
- Cardinality: one product to many changes
- Alias:
changes, read asproduct.changes - Storage: no pivot table. The link reads the
product_idcolumn onproduct_change - Writes: none. The link is
readOnly, so you create changes with the workflows, never through the link
product.changes returns every change on the product, including audit changes and resolved ones. To filter by status, query the product_change entity with a product_id filter instead, because query.graph can’t filter on linked records.
Actor fields
created_by, confirmed_by, declined_by, and canceled_by hold actor ids as plain text: a seller id when the change came from a vendor route, a user id when it came from an admin route. They aren’t module links, so query.graph can’t expand them. Resolve the seller or user yourself when you need their details.