Heat the olive oil in a pan over medium heat. Once it shimmers add the onions and cook until they soften, about five minutes. Add the mushrooms and cook until the excess liquid has evaporated and the mushrooms have reduced in volume, about eight minutes. Add the garlic and cook for thirty seconds. Remove the pan from the heat to cool slightly.
In a bowl add the ricotta, salt, pepper, and parmesan cheese. Stir in the mushrooms. Cover and chill while you make the pasta.
This will make enough filling for about 39 circular ravioli. The pasta was made with 3 cups of flour (2 semolina, 1 all-purpose).