I wasn't aware that it could -- on its own, depending upon design -- provide significant filtration of such contaminants, although I am considering how it could also help divert rainwater to the side property lines, aiding its flow past the house to the front yard and sewer.
However, the best place for the garden -- best sun, and out of the way of other activity -- would still catch a lot of runoff.
You can get some more context on what I'm describing from this article, though it sounds like your swale might be shallower. https://permaculturenews.org/2015/07/24/how-to-build-a-swale...
If you do it, you might consider filling yours with wood chips for appearance, easy maintenance, extra filtration, and to encourage soil building.