What, swapping 9 speed mech for a 10 or vice versa, but keeping same cassette, shifter and chain?
In general you should keep the lot the same as cable pull ratios likely won’t be right, but you might get away with it with some index tweaking and having to shift up then down to get the right gear etc, but you might hit problems after things have worn a bit.
Comprehensive answer…
http://blog.artscyclery.com/science-behind-the-magic/science-behind-the-magic-drivetrain-compatibility/
Would say that 9 and 10 seem significantly different enough to not be compatible.
Even 10 and 11, it looks more like you’d get compatibility between SRAM 10sp road/mtb and 11sp road, but not 11sp mtb mechs