Skip to Content
Vue Flow v2 is here and joins xyflow! Read more here →
ReferenceUtils

getOutgoers()

Source on GitHub 

The getOutgoers util returns the target nodes directly connected to a given node — i.e. the nodes on the other end of every edge whose source is that node.

import { getOutgoers } from '@xyflow/vue'; const outgoers = getOutgoers(node, nodes, edges);

Signature

Parameters:
NameTypeDefault
nodeNodeType | { id: string; }

The node to get the connected nodes from.

nodesNodeType[]

The array of all nodes.

edgesEdgeType[]

The array of all edges.

Returns:
NodeType[]

An array of nodes that are connected over edges where the source is the given node.

Notes