Some paint sprayers are designed with fittings that allow you to connect them to an ordinary garden hose. With this type of paint sprayer, the pressure of the water passing through the hose is generally adequate for removing all paint residue inside the paint spray gun and you do not need to use soap and water combinations.
Understand that if you use oil-based paints or acrylic paints then you cannot clean the residue out of the paint gun with just water. If you are using a spray paint gun that connects to a garden hose for cleaning purposes be sure to read the manufacturer’s recommendations before you paint with an oil based primer or paint.