Skip to content
UPG is in early alpha. The specification is still evolving and may change between versions.
Tools/Workspace & Portfolios/batch_create_cross_product_edges

batch_create_cross_product_edges

Create up to 50 cross-product edges in one atomic write (the portfolio-tier mirror of batch_create_edges). Every edge is validated and qualified before anything is written; if any is invalid the whole batch is rejected. Referenced products are auto-registered.

Workspace & Portfoliosatomic. All edges validated first, then a single portfolio.upg flush.

Arguments

edgesarrayrequired

Cross-product edges to create (max 50). Each: { source_id, target_id, type, source_product_id?, target_product_id? }.

auto_create_portfoliobooleanoptional

Create an empty portfolio document if none exists (default false)

dry_runbooleanoptional

Forecast the batch without mutating: returns { dry_run: true, would_counts, edges:[{ would, edge }] } and writes nothing. The pre-flight that makes a large backfill safe to reason about.

supersedebooleanoptional

Classification edges only. Retire a prior same-axis edge when a classify write moves a source on a single-select axis (default true). Set false to keep both (additive).

Returns

Shape
{ message, created: UPGCrossEdge[], count, portfolio_file, registered_products? }

See Also