Preheat oven to 350 degrees and spray a 8 x 8" baking dish with nonstick cooking spray.
Peel and thinly slice potatoes using a mandoline or sharp knife
4 russet potatoes
Slice onion on mandoline
Place a layer of potatoes in casserole dish
Add a layer of onions
Sprinkle with 2 tablespoons of flour and ¼ teaspoon of salt and pepper
Top with 1 cup of ham and ½ cup of cheese
Add a third layer of potatoes
Mix dijon mustard with a small amount of milk in a large glass measuring cup. Slowly add remaining milk, stirring as you add. Sprinkle in dried thyme. Pour milk mixture over prepared casserole.
2 cups whole milk, 1 Tablespoon dijon mustard, ¼ teaspoon dried thyme
Add remaining ½ cup of cheese
Cover with foil and place casserole dish on a baking sheet
Bake in preheated oven for one hour. Remove foil and continue baking for 30-45 minutes until top is browned, mixture is bubbly and potatoes are soft
Top with fresh chopped parsley, if desired