Myopia is definitely hereditary, especially the pathologic variants that can lead to retinal tears and the like.
That being said, there is the process of refractive development that occurs early on in life. The eye develops at a frighteningly fast pace, and you achieve near-adult globe size after about 18 months. The genes that drive this refractive development could be hereditary, if that is what you're trying to figure out.
Now, we can make a claim that this adaptation during infancy could eventually affect our genome, but I have not delved into the epigenetic literature to determine if that has been borne out or not.