refactoring return type of getAllRessources from QueryResult to List