Peel the onions and cut into strips. Clean the mushrooms and cut them into slices. Wash and halve the tomatoes.
Heat the olive oil in a pan and fry the gnocchi until golden brown. Put the gnocchi in a baking dish.
Fry the onions and mushrooms in the pan and season with thyme. Add the tomatoes and fry briefly. Put everything in the baking dish over the gnocchi.
Bring the vegetable stock to the boil in the pan, stir in the tomato paste and cream cheese. Add milk to the desired consistency. Season with salt and pepper, pour over the gnocchi and sprinkle with the grated cheese.