Thinly slice the onion, and reserve 1 tablespoon of the top for garnish. Stir the remaining onion into the egg along with the bean sprouts and 1 tablespoon of soy sauce.
Heat 1 tablespoon of peanut oil in a large nonstick frypan over medium-high heat until hot. For each omelette, drop 1/4 cup of egg mixture into the hot oil. Cook until the bottoms are set, 1 to 2 minutes, then turn over and continue cooking for another 1 to 2 minutes until cooked through. Transfer to a warm serving plate while you make the remaining omelettes.
Heat the remaining 1 tablespoon of peanut oil in the frypan and cook the mushrooms with the remaining 2 tablespoons of soy sauce until the mushrooms are soft, about 3 minutes. Dissolve the cornflour in the stock, stir into the mushrooms, and cook until thickened. To serve, pour the sauce over the egg foo yung, and sprinkle with the reserved onion.