1. Preheat the oven to 180°C (350°F).
2. Peel and finely slice the onions, then sauté them in a pan with a drizzle of olive oil until translucent.
3. Meanwhile, grate the zucchini and add them to the onions. Season with salt and pepper, and continue cooking for 2-3 minutes.
4. In a bowl, beat the eggs, then add the milk, 40g of grated gruyère cheese, basil, and semolina. Mix well. Then, incorporate the onion/zucchini mixture and adjust the seasoning if necessary.
5. Pour the mixture into a gratin dish or a cake pan, then sprinkle the remaining grated cheese on top. Bake for 30-35 minutes. Serve hot or cold.