Skip to content

NeighborSpec

NeighborSpec

Bases: BaseConfig

Specification for selecting neighbors in a graph query.

start_nodes = Field(..., description='List of starting node IDs.') class-attribute instance-attribute

start_node_type = Field(..., description='The type of the start node.') class-attribute instance-attribute

start_node_alias = Field('s', description='Alias for the source node.') class-attribute instance-attribute

edge_type_set = Field(None, description='Set of allowed edge types for traversal.') class-attribute instance-attribute

edge_alias = Field('e', description='Alias for the edge.') class-attribute instance-attribute

target_node_type_set = Field(None, description='Set of allowed target node types.') class-attribute instance-attribute

target_node_alias = Field('t', description='Alias for the target node.') class-attribute instance-attribute

filter_expression = Field(None, description='A string defining complex filtering logic.') class-attribute instance-attribute

return_attributes = Field(None, description='List of attributes to include in the results.') class-attribute instance-attribute

limit = Field(None, description='Maximum number of results to return.') class-attribute instance-attribute