Switch boards that rotate?

Hi all,

Been trying to figure this out because all the lights I have been making lately are weapon-mounted with remotes- how do companies like streamlight make the tailcap rotate freely and independent of the switchboard to avoid twisting the cable? I use cable glands currently for the water protection but I wouldn’t mind avoiding damaged cables due to over twisting- any help would be appreciated. Thanks!