traverse_order_products
Finds all products linked to an order by order ID, or all orders linked to a product by product ID, using a forward or reverse traversal of the order-products relationship.
Instructions
Traverse the Order → Product link "orderProducts" (many-to-many). direction=forward: pass a Order pk, get linked Product objects. direction=reverse: pass a Product pk, get linked Order objects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pk | Yes | ||
| direction | No | forward |