What kinds of things can be detected by barium swallow X-ray test?

Many things. In some circles barium swallow includes just throat/pharynx. Sometimes includes pharynx and esophagus. Pharynx examination looks for dysmotility, oropharyngeal coordination, aspiration of barium into airway, and possible obstruction to movement of barium column. Evaluation of esophagus shows dysmotility, irritability from gastroesoph. reflux, stricture, infection, diverticulum etc.
Esoph/stomach stuff. Abnormalities of swallowing mechanism, anatomical abnormalities of esophagus (webs, diverticula-pockets, strictures, masses, ulcers), hiatal hernias (outpouch of stomach above diaphragm), reflux of stomach content into esophagus, mucosal ring (schatzki), extrinsic compression (pressure froms tructure outside esoph). Stomach issues like ulcers, polyps, masses, etc. Other stuff too.
Blockage. The barium swallow will pick up areas of obstruction or potential masses in the gastro intestinal tract.