Wash tomatoes. Wash the spinach, remove any stalks that are too long. Drain the spinach well. Peel garlic and chop finely. Peel onion and chop finely.
Heat the oil in a coated pan. Fry the tomatoes, gnocchi and onion cubes for about 3 minutes until the tomatoes burst open. Add spinach and garlic and season with salt and pepper. Finally, pour in the cream and milk, bring to the boil and season to taste again.
Fill the gnocchi into 4 small baking dishes. Crumble the cheese and sprinkle on top. Gratin the molds in a preheated oven (electric stove: 225 ° C / fan: 200 ° C / gas: level 4) for 5–8 minutes. Take out and serve immediately.