So long as the water isn’t coming into contact with the edible parts of the plant, this is fine. This means for most vegetables and herbs, grey water irrigation is going to be a no-go (unless you are using subsurface irrigation or drip irrigation systems), whereas, for fruit and nut trees greywater reuse is ideal.
Always make sure to wash your fruit and vegetables before consumption (and as a bonus, you can add the water used to wash them to your greywater recycling system). Check the guide for information on what water is safe for use as greywater.