Yam is rich in starch and proteins, and proteins can be good for your eyes. But to supplement nutrients for your eyes, there are many other kinds of foods which are more effective than yams, such as eggs, milk and other dairy products, animal livers, vegetables and fruits that contain many vitamin A, C, E, B and carotenes. Vitamin C can help prevent the eyes from cataracts, and vitamin A can prevent people from night blindness. Carotenes can help compose vitamin A. Therefore, you can eat more foods mentioned above accordingly.
I also agree with your grandpa.
According to traditional Chinese medicine, yums can tonify our spleen, lung and reinforce our kidney that are relevant to the health of our eyes( as a good condition of visceral organs can assure you a good blood provision) .
What's more, yams are rich in protein, vitaminB, C,E which are important in restoration of eye cells.
You can cook in this way:
Ingredients: yams, mulberry, red dates, medlar( each 10 gram)
Method: boil all the ingredients above in the water into soup.
Take the soup everyday, which can eliminate the eyestrain and improve your vision.
Hope that will help.