Add suggestions with fuzzy text search when no relationship is found (#2583)

This commit is contained in:
Laurence Isla
2023-02-02 03:30:15 -05:00
committed by Steve Chavez
parent 171dd313d9
commit 9d4ff812c9
6 changed files with 75 additions and 23 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ getJoinConditions tblAlias parentAlias Relationship{relTable=qi,relForeignTable=
findRel :: Schema -> RelationshipsMap -> NodeName -> NodeName -> Maybe Hint -> Either ApiRequestError Relationship
findRel schema allRels origin target hint =
case rels of
[] -> Left $ NoRelBetween origin target schema
[] -> Left $ NoRelBetween origin target hint schema allRels
[r] -> Right r
rs -> Left $ AmbiguousRelBetween origin target rs
where