I use a mulch basin style gray water irrigation system, i.e. the washing machine gray water is directly irrigating plants.
I prefer a lye soap, or as close as I can get, for this reason. The fewer ingredients the better. Scents and dyes are obvious "No"s for this application.
The vast majority of commercially available "soaps" these days are actually detergents. Detergents can be appropriate for certain applications, but contributing to your gray water in an irrigation setting is probably not one of them.
Recently I have been using this
https://rebelgreen.com/collections/all-products/products/fresh-laundry-detergent-unscented-64oz
The label shows "Saponified Organic Coconut Oil," indicating that this is in fact a type of soap (saponified = rendered into soap) made from plant fat and a type of lye. As opposed to detergent, which is made from
petroleum.
There are still a few questionable ingredients, which I wouldn't feel comfortable consuming on food, but it still beats the heck out whatever is in Tide, etc.
And my gray water mulch basin is used to irrigate animal fodder crops, so any residues have to go through two other lifeforms before it gets to my table.
In my estimation, the laundry soap I linked above (or similar) is acceptable for gray water.