Voisins du Graphe
Retrieves neighboring entities (directly connected) of an entity in the ontology graph, with connection edges.
Parameters
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
entityId | dynamic value | Yes | Yes | Identifier of the entity to retrieve neighbors for. |
direction | choice (outbound, inbound, any) | No | No | Direction of relationships to follow: outbound, inbound, or any. (Default: "any") |
relationshipTypes | array | No | No | Filter by relationship types (empty = all relationships). |
limit | number | No | No | Maximum number of neighbors to return per entity. (Default: 100, min 1, max 1000) |
depth | number | No | No | Traversal depth (1 = direct neighbors, 2-3 = neighbors of neighbors). (Default: 1, min 1, max 3) |
includeEdgeData | boolean | No | No | Include relationship properties in the response. (Default: false) |
sortBy | choice (weight, type, created_at) | No | No | Sort criteria for the returned neighbors. |
outputVariable | text | No | No | Output variable name containing the found neighbors. |
Parameters marked Variable = Yes accept the
{{blockName.field}}syntax.
Output
Output variable : neighbors
{
"nodes": [],
"edges": []
}
Example
Find the neighbors of a supplier.
Input :
{"entityId": "supplier-123"}
Output :
{"nodes": [{"id": "contract-1", "type": "Contract"}], "edges": [{"from": "supplier-123", "to": "contract-1", "type": "has_contract"}]}
Tip
{{neighbors.nodes}} contains neighbor entities. {{neighbors.edges}} contains relationships. Adjust depth to extend the search (default 1).