FAIMS-219 - fix the queries for listing arch entities and relationships