Preheat oven to 375 degrees F.
Prepare gnocchi according to package directions. Drain and place gnocchi in a single-layer in a 1.5 quart shallow baking dish that has been sprayed with cooking spray.
1 lb gnocchi, cooking spray
Melt butter in a medium saucepan over medium heat. Stir in garlic and cook until fragrant, about 30 seconds. Whisk in flour until it thickens and bubbles, then whisk in milk and Dijon. Continue to whisk mixture and cook until slightly thickened, about 3-5 minutes.
2 tbsps butter, 1 tsp minced garlic, 1 tbsp all-purpose flour, 3/4 cup whole milk, 1 tsp Dijon mustard
Combine Gruyère and Fontina cheese, then add by the handful to milk mixture, stirring until melted before adding the next handful. Once all cheese is melted, season sauce with salt and pepper.
1/4 cup shredded Gruyère cheese, 1/4 cup shredded Fontina cheese, table salt , white pepper
Pour sauce over gnocchi and sprinkle with Parmigiano-Reggiano over top. Bake gnocchi until they puff and cheese is golden and bubbly, about 25 minutes.
1/3 cup shredded Parmigiano-Reggiano
Let gnocchi rest for 5 minutes before serving. Sprinkle each serving with basil.
basil leaves for garnish, optional