The RDF namespaces and standard prefixes that the WDQS UI knows about are hard-coded in wikibase/queryService/RdfNamespaces.js. They should be configurable. (Possibly split between standard namespaces like rdfs and Wikidata-specific ones like wd.)
|Open||None||T194175 Make WDQS UI completely configurable for other Wikibase installations|
|Open||None||T211799 Make RDF prefixes configurable|
|Open||None||T194180 Make WDQS UI’s RDF namespaces and standard prefixes configurable|
Prefixed listed here: https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Prefixes_used probably should be configurable, except for wikibase one which probably should stay the same. Configuration should allow for easily generating the set of prefixes from a common URI prefix, since they all share the same one.