For the Chocolate Chip Cookie Cake: In a medium mixing bowl, whisk together the all-purpose flour, whole wheat flour, baking soda, and nutmeg.
In the bowl of a standing mixer fitted with the paddle attachment or a large mixing bowl with a hand mixer, beat together the butter, brown sugar, granulated sugar, and the salt on medium speed until smooth, about 3 minutes. Add the whole egg, beating for 1 minute and stopping to scrape down the bowl before adding the egg yolk. Beat for another minute and scrape down the bowl again. Beat in the milk and vanilla.
Reduce the mixer speed to low, then slowly add the dry ingredients, mixing just until the dough comes together and the flour has disappeared. Add the chocolate chips on low speed, finishing with a few stirs by hand as needed.
Lay two large sheets of plastic wrap down on the counter so that the long sides overlap slightly and you have one large, wide sheet. Scrape the dough into the center, then spread it into a thick disk. Fold the edges of the plastic up and around the dough to wrap it completely. Refrigerate for at least 1 hour or up to 3 days.
When ready to bake, preheat the oven to 350°F (if using a clear glass dish, reduce temperature to 325°F). Generously coat a 9-inch springform pan, 9-inch pie dish, or 9-inch cake pan with baking spray. Press the dough into the pan in an even layer. Bake for 20 to 25 minutes, until the top is lightly golden brown and a toothpick inserted in the center comes out clean. Check at the 15-minute mark—if the cookie cake is browning too quickly at the edges, loosely tent it with foil. Remove from the oven and place the pan on a wire rack to cool completely.
Meanwhile, make the Chocolate Fudge Frosting (optional): Sift the powdered sugar and cocoa powder together into a bowl. In a separate bowl, beat the butter on medium speed until light, smooth, and creamy, about 2 minutes. Reduce the mixer speed to low, then add half of the powdered sugar and cocoa mixture. Add all of the milk, espresso powder, and vanilla. Beat to combine, then add the rest of the dry ingredients and beat for 2 minutes until well combined. Taste and add a pinch of salt if the frosting seems too sweet.
Frost and serve: Once the cookie cake has cooled, run a sharp knife around the edges to loosen it, then transfer it to a serving dish (you can also serve it directly from the pan). If desired, decorate with the chocolate frosting.
Notes
*You can use any milk for the frosting and cookie you like. I prefer something with some fat in it (such as whole milk, cream, or half and half) because it’s a small amount and results in a richer, creamier frosting.
TO MAKE AHEAD: Prepare your cookie dough ahead of time, and store it in the refrigerator for up to 3 days or freeze it for up to 3 months.
TO STORE: Cover and store leftovers at room temperature for up to 3 days.
TO FREEZE: Store the baked cookie (frosted or unfrosted) in the freezer for up to 2 months.