Preheat the oven to 375 degrees and lightly grease a 9x9 baking dish.
Heat olive oil in a large skillet over medium heat. Add the diced onion and cook until softened.
Add the chicken pieces and minced garlic to the skillet. Cook until the chicken is lightly browned on all sides.
Sprinkle the flour over the chicken mixture and stir to coat. Slowly pour in the chicken broth and milk, stirring until the sauce thickens.
Stir in the thyme along with salt and pepper to taste. Remove the skillet from heat.
Layer half the sliced apples in the bottom of the baking dish. Spoon half the chicken mixture over the apples. Repeat with the remaining apples and chicken mixture.
Sprinkle the shredded cheddar evenly over the top. Bake for 25 to 30 minutes until the cheese is melted and the edges bubble.