According to Mr. Ohm and Mr. Watt, you will have a drop of voltage in the cable and a corresponding loss of power proportional to the cable resistance value.
If your cable is shit and is composed of a filament of a micrometer of "conductor", sure it will have high resistance.
The Switch drains 9.xx watts when playing undocked in order not to discharge.
If your cable was perfect and you used a 2A power source, you would have 5Vx2A = 10W, so it will charge up no problem.
If your cable or power source are shit, you will have less than 9W (because of the Vdrop on the cable), and it will discharge.