Skip to main content

Voisins du Graphe

Retrieves neighboring entities (directly connected) of an entity in the ontology graph, with connection edges.

Parameters

ParameterTypeRequiredVariableDescription
entityIddynamic valueYesYesIdentifier of the entity to retrieve neighbors for.
directionchoice (outbound, inbound, any)NoNoDirection of relationships to follow: outbound, inbound, or any. (Default: "any")
relationshipTypesarrayNoNoFilter by relationship types (empty = all relationships).
limitnumberNoNoMaximum number of neighbors to return per entity. (Default: 100, min 1, max 1000)
depthnumberNoNoTraversal depth (1 = direct neighbors, 2-3 = neighbors of neighbors). (Default: 1, min 1, max 3)
includeEdgeDatabooleanNoNoInclude relationship properties in the response. (Default: false)
sortBychoice (weight, type, created_at)NoNoSort criteria for the returned neighbors.
outputVariabletextNoNoOutput 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).