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

getIncomers()

Source on GitHub 

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

import { getIncomers } from '@xyflow/vue'; const incomers = getIncomers(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 target is the given node.

Notes