The genetic basis of a host's resistance to parasites has important epidemiological and evolutionary consequences. Understanding this genetic basis can be complicated by non-genetic factors, such as environmental quality, which may influence the expression of genetic resistance and profoundly alter patterns of disease and the host's response to selection. In particular, understanding the environmental influence on the genetic resistance of mosquitoes to malaria gives valuable knowledge concerning the use of malaria-resistant transgenic mosquitoes as a measure of malaria control. We made a step towards this understanding by challenging eight isofemale lines of the malaria vector Anopheles stephensi with the rodent malaria parasite Plasmodium yoelii yoelii and by feeding the mosquitoes with different concentrations of glucose. The isofemale lines differed in infection loads (the numbers of oocysts), corroborating earlier studies showing a genetic basis of resistance. In contrast, the proportion of infected mosquitoes did not differ among lines, suggesting that the genetic component underlying infection load differs from the genetic component underlying infection rate. In addition, the mean infection load and, in particular, its heritable variation in mosquitoes depended on the concentration of glucose, which suggests that the environment affects the expression and the evolution of the mosquitoes' resistance in nature. We found no evidence of genotype-by-environment interactions, i.e. the lines responded similarly to environmental variation. Overall, these results indicate that environmental variation can significantly reduce the importance of genes in determining the resistance of mosquitoes to malaria infection.