Preheat your oven to 375°F (190°C).
If using packaged gnocchi, cook it according to package instructions until they float. Drain well and set aside.
In a medium saucepan over medium heat, melt butter and sauté chopped garlic until fragrant. Gradually whisk in flour, then add milk, dijon mustard, gruyère, fontina, salt, and white pepper until smooth.
Fold the cooked gnocchi into your creamy cheese sauce until well coated. Transfer everything into a greased baking dish.
Sprinkle grated parmesan over the top and bake for about 25 minutes until bubbly and golden brown.
Once baked, remove from oven and let cool slightly before serving with fresh basil leaves if desired.