Lego toys can be washed in the dishwasher as long as you place them on the top rack of the dishwasher.
You should also place the Lego toys in something to prevent them from getting thrown around in the dishwasher which could then cause them to fall to the bottom rack and get melted.
What I did was take a bowl and then drill a few hols into the bottom of it to allow the water and soap to drain away from the Lego toys.
You could probably use something else such as a plastic ice cream bucket as well with holes drilled in the bottom and sides to clean the Lego toys.
Just as long as you place the Lego in something so they won't move around in the dishwasher the Lego will be perfectly safe in the dishwasher.