fixed querying from relationship graph