Heat up the oil in a frying pan and add the finely chopped onions, cook for five minutes until softened, reduce the heat and allow to sweat for a further few minutes. Set aside to cool.
Add the beef to a mixing bowl and break up with your fingers. Add the chilli, garlic and parsley and mix well with your hands, Once the onions have cooled, add to the mixture. Combine mixture with an egg and finish with a generous pinch of salt and black pepper.
Mould the mixture into four patties or six smaller ones depending on how thick you like them, then lightly dust them with flour. If you have time, chill them for 30 minutes to stiffen. Once moulded, fry the burgers in a hot pan for about 6 minutes on each side, depending on how you like them cooked. Make sure they are cooked throughout and piping hot.
Once cooked, place a slice of Gruyere cheese onto of the burger and put under the grill for one minute or until cheese is melted. Serve on a fluffy white bap with homemade chilli jam.