Peel the onions and cut them into thin rings.
Melt the butter in a pot (which has a lid) and cook the onions for 10 min until they become translucent.
Sprinkle the onions with flour, mix and cook for 1 minute.
Add the salt, pepper, garlic, thyme, and pour in the broth and the white wine.
Cover the pot with the lid and cook for about 35 minutes.
While the soup is cooking, cut the bread into small slices and lightly apply olive oil to both sides of the bread.
Toast the bread in the oven for about 5 to 7 minutes until lightly browned.
Pour the soup into 4 individual bowl.
Float a slice of bread on top of the soup.
Sprinkle the top of the bread with grated Gruyère cheese.
Place the 4 bowls of soup in the oven for 3-4 minutes till the cheese melts.
Remove from the oven and add some chives or parsley for decoration.
Serve immediately.