The Discussions GraphQL API seems only to be for managing discussions; I did not see any way to enable it for a repo for which it has not been enabled manually (or with the gh cli) already.
So I made this: https://github.com/scottvr/gh_discussions_mass_enable which uses a browser, interactive auth (including 2FA), and the ability to specify one or more (or --all) of your repos to enable discussions on.