Skip to content
UPG is in early alpha. The specification is still evolving and may change between versions.
Tools/Edges/batch_create_edges

batch_create_edges

Create up to 50 edges in one atomic call. Use this for 3+ edges instead of looping `create_edge`. Edge type auto-infers when omitted. Pass `validate_only: true` for a dry-run that reports every would-be error WITHOUT writing.

Edgesatomic. Full validation pass before any mutation lands. `validate_only` never mutates.

Arguments

edgesarrayrequired

Array of edges to create (max 50)

validate_onlybooleanoptional

Dry-run: validate every edge and report `{ valid, errors, would_create_edges }` WITHOUT writing.

expect_productstringoptional

Optional guard: abort if the active product is not this id/title/file.

Returns

JSON: on commit, { created, count }.
On validate_only, { validate_only, valid, errors, would_create_edges }.

See Also