2 tablespoons unsalted butter
1 medium onion, thinly sliced
4 cups whole milk (or 2 cups milk and 2 cups water)
2 to 3 garlic cloves, smashed
1 heaping teaspoon Dijon mustard (or dry mustard powder)
2 1/2 pounds (about 6 medium) baking potatoes, peeled
1 1/2 cups grated cheddar cheese, divided
3/4 cup heavy cream
Kosher salt and freshly ground black pepper
Preheat oven to 375°F. Lightly grease a medium sized (1-1/2 to 2 quart) gratin or baking dish.
In a large Dutch oven, melt the butter over medium heat. Add onions and sauté until softened, about 5 minutes. Add the milk (or milk and water), garlic, and Dijon mustard and bring to a gentle boil over medium heat. Add a generous amount of salt and pepper.
Meanwhile, slice the potatoes to 1/8-inch thickness, using a food processor or mandoline for even thickness. (Do not rinse the potatoes.) Add the potatoes to the milk and allow to simmer until the potatoes are almost tender — they should still have some resistance when poked with a paring knife — about 10 minutes.
Using a slotted spoon, transfer half of the potatoes and onions to the baking dish. (Discard the milk or save for another culinary use.) Season generously with salt and pepper and top with 3/4 cup cheddar cheese. Cover with the remaining potato mixture, season again with salt and pepper and top with remaining cheese. Pour the cream evenly over the potatoes and cheese.
Bake until crisp and golden on top, 50 minutes to 1 hour. Allow to cool for at least 10 minutes before serving. (Leftovers make a perfect breakfast side.)