Preheat oven to 425 degrees F.
Make the pie dough. Combine 1 ¼ cup all-purpose flour with ¼ tsp, ¼ cup grated parmesan, and ½ cup cold butter. Use a food processor, pastry blender, or your hands to mix until well combined. The mixture should resemble coarse sand. Add 3-4 tablespoon ice-cold water, mixing just until the dough comes together. Shape into a disc and wrap in plastic wrap. Chill in the fridge for 30 minutes.
Meanwhile, make the filling. Heat 1 tablespoon oil in a large saute pan over medium heat. Add sliced onion and season with 1 teaspoon salt. Saute until softened, about 10 minutes. Reduce heat to medium-low and continue to cook until caramelized, about 45 minutes. Remove from heat and let cool.
Combine the caramelized onions with ½ teaspoon garlic powder, ½ teaspoon black pepper, 1 teaspoon fresh thyme, ¼ cup sour cream, and ½ cup gruyere, stirring until well combined.
Dust a clean work counter with flour. Roll out the pie dough into a large circle, about ¼ inch thick. Spread the onion filling in the center, leaving a 1-inch border. Fold over the edges to create a crust.
Brush the edges with heavy cream and sprinkle grated parmesan on top. Bake for 20-25 minutes or until golden brown. Let cool for 10 minutes. Serve warm.