Are you using alias? What does
You might be running into fallout from DNF 1 to DNF 2 migration, see https://fedoraproject.org/wiki/Changes/DNF-2.0
and the tracking bug https://bugzilla.redhat.com/show_bug.cgi?id=1377324
It is possible that a dnf plugin (repoquery is a dnf plugin) is still using DNF 1 API and you have DNF 2 installed. Try disabling the plugin(s) by running dnf with the --noplugins or --disableplugin=pluginname switches. If that helps you should report a bug against the plugin(s) you disabled or against dnf.
Btw: This post should go under the "Rawhide" section instead of here. Just a note for the future.