In a large saucepan, bring the coconut milk and 1/4 cup of sugar up to 180℉ over medium heat, stirring very often. The mixture should be hot and start to steam across the top, but should not boil.
While the coconut milk is heating, mix the cornstarch and 1/4 cup of sugar together in a medium bowl.
Add the egg yolks and whole egg to the cornstarch mixture and whisk to combine well.
When the coconut milk is hot, slowly whisk one cup of hot coconut milk into the egg mixture and then whisk the egg mixture back into the pan of hot cream.
Cook over medium heat until the mixture starts to bubble and thicken, stirring constantly, about 6 minutes.
Remove from the heat and stir in 1/2 cup toasted coconut, butter, and vanilla.
Place the hot pie filling in a prepared graham cracker crust and refrigerate until cool. It can be covered and left for up to three days in the fridge.
When you are ready to serve the pie, whip the heavy cream and place it on top of the pie and sprinkle with 1/2 cup of toasted coconut flakes.
Notes
I recommend using heavy whipping cream or heavy cream (they are the same) in this recipe because the higher fat content creates a more stable whipped cream. Avoid regular whipping cream in this pie.
If you don't like the texture of the coconut in the pudding, you can leave it out and only put some on top.
Make sure to use the full-fat canned coconut milk for this pie (the kind of coconut milk that comes in a refrigerated carton is more of a beverage and won’t work with this recipe).
This is a great pie to make ahead and store in the fridge - it's best served cold anyway.