I have black walnut on property. Like the bracken fern, and the soda apple, none of my animals have the least bit interest in it. Same with the potato foliage, and the tomato foliage. But they have choices, which is the key.Not sure, but it is possible. Walnuts have a chemical (juglone) that suppresses competing plants in the area where the leaves fall. I doubt (but do not have experience) that it would harm the garden.
From Iowa State University: