Using whole wheat flour instead of all-purpose and semolina
You can, although the vast majority of whole wheat pasta recipes also include flours that are not whole wheat. When I first answered this question I missed that you were looking to make pasta using only whole wheat flour.

One way it can work to use all whole wheat is to make the dough, knead, and then rest it overnight recipe, but I'm a bit dubious that the final result will be completely satisfactory. Simply put, if using whole wheat alone can make good pasta, we would see more recipes that only include whole wheat.

If you search for "whole wheat pasta recipe" you will find many recipes that include whole wheat and another flour. The ratio of whole wheat to other flours will vary, I'd definitely look for recipes from very solid sources or recipes that have many excellent reviews. There are a lot of not-very-good recipes out there.

Of all the recipes I looked at from sources that I trust, Mario Batali's uses the highest proportion of whole wheat. He uses a 7:1 ratio. The reviews on that particular recipe aren't stellar, but the comments suggest that the reviewers liked the pasta, just not the sauce.