transform.link
link(config: LinkConfig, options?: LinkOptions): Promise<TransformResult>Create edges between nodes whose property values satisfy a join condition.
For each visible source node, its sourceProperty value is matched against
the targetProperty value on all visible target nodes. A new edge is created
for each match, skipping self-links and pre-existing edges with the same
source→target+relationship. The operation is recorded in history as "LinkNodes"
and is fully undoable.
config | LinkConfig | sourceProperty: property on source nodes to match;
targetProperty: property on target nodes to match against;
relationship: relationship name for created edges (default "LINKED_TO"). |
options | LinkOptions | Optional: sourceCategory/targetCategory restrict which nodes
participate; matchType controls exact vs case-insensitive string comparison
(default "exact"); matchFn provides a fully custom match predicate. |
Returns: Promise<TransformResult>
Example
await api.transform.link(
{ sourceProperty: "empId", targetProperty: "id", relationship: "WORKS_AT" },
{ sourceCategory: "Person", targetCategory: "Company" },
);