Preheat the oven to 400°F (200°C).
Pierce sweet potatoes with a fork and bake until tender, about 45 minutes.
Allow sweet potatoes to cool, then peel and mash them in a bowl.
Add flour, egg, and salt to the mashed sweet potatoes and mix until a dough forms.
Dust a surface with flour and roll the dough into long ropes, then cut into gnocchi pieces.
Bring a large pot of salted water to a boil, then cook the gnocchi in batches until they float, about 2-3 minutes.
Remove gnocchi with a slotted spoon and serve with your favorite sauce.