In a bowl, mix together the flour, cornmeal, sugar, and salt.
Cut in the chilled butter using a stand mixer, a food processor, or a pastry blender until it's evenly distributed but still in large, visible pieces.
Add the olive oil and ice water and mix until the dough begins to come together.
Gather the dough with your hands and shape it into a disk.
Wrap the disk in plastic and refrigerate for at least 1 hour.
Heat the olive oil in a sauté pan, preferably nonstick, over medium heat. Add the sliced onion and cook, stirring frequently, until lightly browned, about 10 minutes. Season with salt and pepper transfer to a bowl and set aside to cool.
Adjust an oven rack to the center position and heat the oven to 375°F. Line a baking sheet, preferably one without sides, with kitchen parchment. (If your baking sheet has sides, flip it over and use the back.)
Roll the dough on a floured surface
into a 15-inch round, lifting the dough with a metal spatula as you roll to make sure it's not sticking. If it is, dust the surface with more flour. Transfer it by rolling it around the rolling pin and unrolling it on the lined baking sheet.
Spread the onion over the dough, leaving a 2-inch border without filling
. Arrange the apple and tomatoes in a single layer over the onions and season them with salt and pepper.
Sprinkle the cheese over the tomatoes.
Lift the edges of the dough and fold them inward over the filling, pleating as you go, to form a folded-over border.
Pinch together any tears in the dough. Brush the egg yolk and milk mixture over the exposed crust.
Bake until the crust has browned and the cheese has melted, 35 to 45 min. Slide the galette off the parchment and onto a cooling rack. Let cool for 10 minutes.
Cut the galette into wedges and serve warm.