I am currently using sway. Before doing system updates I thought "meh, let's yank GNOME".
This uninstalled GDM too, which I didn't know at the point. After a reboot, I just had a tty. Additionally, this also doesn't start NetworkManager, meaning you won't have an internet connection.
To solve it, I did the following:
sudo systemctl start NetworkManager
nmcli connection up SSID
Run history and see how far you need to go back. Remember the ID of the point in time you want to restore to.
dnf history | head -l 20
Run rollback:
sudo dnf history rollback ID
Re-enable graphical environment and gdm:
sudo systemctl set-default graphical.target
sudo systemsctl enable gdm.service
restart
Upon reboot, the usual login screen will show up and start sway again.