Based on what I've read, people were really not that xenophobic in the middle ages. Shit got really bad during colonial times but the middle ages were "relatively" chill. A few examples would be large Saxon communities in Transylvania, Italians chilling in Crimea with their Mongol overlords and Armenian buddies, and Persians working in the Chinese government.
Also immigrating during the middle ages was far harder, firstly is transportation, secondly is finding a way to learn a foreign language. Thirdly welfare doesn't exist, no government handouts.