Add hint to verify table and foreign key existence on a relationship error

This commit is contained in:
Laurence Isla
2021-12-20 12:11:07 -05:00
committed by GitHub
parent cc8a7ef0c2
commit c858d158aa
5 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ addRels schema allRels parentNode (Node (query@Select{from=tbl}, (nodeName, _, a
findRel :: Schema -> [Relationship] -> NodeName -> NodeName -> Maybe Hint -> Either ApiRequestError Relationship
findRel schema allRels origin target hint =
case rel of
[] -> Left $ NoRelBetween origin target
[] -> Left $ NoRelBetween origin target schema
[r] -> Right r
-- Here we handle a self reference relationship to not cause a breaking
-- change: In a self reference we get two relationships with the same