File tree Expand file tree Collapse file tree
langchain-coordinode/langchain_coordinode Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ def refresh_schema(self) -> None:
7272 structured = _parse_schema (text )
7373 # Augment with relationship triples (start_label, type, end_label) via
7474 # Cypher — get_schema_text() only lists edge types without direction.
75+ # No LIMIT here intentionally: RETURN DISTINCT already collapses all edges
76+ # to unique (src_label, rel_type, dst_label) combinations, so the result
77+ # is bounded by the number of distinct relationship type triples, not by
78+ # total edge count. Adding a LIMIT would silently drop relationship types
79+ # that happen to appear beyond the limit, producing an incomplete schema.
7580 rows = self ._client .cypher (
7681 "MATCH (a)-[r]->(b) RETURN DISTINCT labels(a) AS src_labels, type(r) AS rel, labels(b) AS dst_labels"
7782 )
You can’t perform that action at this time.
0 commit comments