Plenty of spacecraft seem to have moving parts. Space shuttle doors open, robot arms manipulate things, etc.
This is perplexing, when we consider that lubricating oil probably won't remain liquid, and even solid-on-solid contact risks vacuum welding, which can (and apparently does) freeze up joints. If lubricating won't work, and not lubricating won't work, it seems like we've argued ourselves into a corner.
Robotic arms often seem to be covered in a fabric. Maybe they're just "canned", like a space suit so that the joint itself isn't exposed to vacuum? Excluding those that are canned, are there any types of joints that are actually used in space with the rotating part exposed to vacuum?