Preheat the oven to 350°F. Thinly slice the potatoes to be about a quarter to a half-inch in thickness. I used a mandolin slicer, but this can also be done by hand (it will just take some extra time!).
Spray a baking dish with cooking oil, then arrange the potatoes in the pan so they are just overlapping.
In a medium frying pan, melt the butter, then add the garlic. When the garlic is fragrant, add the flour and whisk constantly.
Slowly pour in the chicken broth and whisk until a creamy sauce has formed. Add the mayonnaise and heavy cream, followed by the cheddar cheese, pepper, and parsley.
Arrange the sliced onions on top of the potatoes as a second layer. Pour half of the creamy sauce over the potatoes and onions. Arrange another layer of potatoes, then pour the remaining cheese sauce over the top.
Bake for one hour. Remove at the hour mark and sprinkle a generous amount of cheddar cheese over the top of the baked potatoes, then return to the oven for an additional 10 minutes. Serve while hot for a great side dish to any meal. Enjoy!