How is a graduate school application affected if an undergrad does research in fields outside of their major?
When looking at graduate applications, the fact that a student has done a some research is much more important than the content (or even the field) of the research.  It probably does not even matter much whether the people reviewing your application even understand your research.  The key point is to have a one or more strong letters of recommendation from your research supervisor(s).  Many research skills transfer relatively well from one field to another, and faculty letters than can attest to your skill level are extremely important to your application file.

Some professors may have a marginal preference for students who have done undergraduate research in the same area in which they pursue graduate studies.  Personally, I do not.  However, it is unquestionably better to have research experience in a relatively unrelated area than to have no research experience at all.