Add to traversal custom query to get parent path