Skip to content

generateEdgeId

generateEdgeId(source, target): string

Defined in: src/components/editor/NodeGraph/nodeGraphIds.ts:31

Generate a unique edge id from its endpoints. Includes source/target port refs in the id so it’s somewhat readable in devtools, plus the standard timestamp + counter + random tail to guarantee uniqueness across rapid back-to-back connections.

Parameters

source

NodeGraphPortRef

target

NodeGraphPortRef

Returns

string