refactoring the graph queries to be in a seperate namespace