Preheat oven to 220 C / Gas Mark 7. Cook the potatoes in a large pan of boiling water until tender, 10 to 15 minutes.
Meanwhile, place the fish in a pan, pour over the milk and add the diced onion. Simmer for 5 to 8 minutes until the fish is cooked and flakes easily.
Drain the potatoes well and mash until smooth. Add the milk and cream and mash again. Stir in the fish and most of the cheddar (keeping some for the top). Season with a little salt and plenty of pepper. Spoon the mixture into a large, shallow, heatproof dish and sprinkle over the remaining cheese.
Bake in the preheated oven for 20 minutes, or until golden.