Ambiguity in the definition of graph homomorphism Given graph $G$ and $H$ and a function between $f : G \rightarrow H$ between the vertex sets, we say that $f$ is a graph homomorphism iff for all vertexes $x$ and $y$ of $G$ such that $xy$ is an edge of $G$, it holds that $f(x)f(y)$ is an edge of $H$.
However, some authors define graphs as having no loops, while others allow loops. These lead to different notions of homomorphism. Is there a correct one?
In particular, disallowing loops leads to a stricter notion of homomorphism, because it means that if $f$ is a homomorphism, then for all vertexes $x$ and $y$ of $G$ such that $xy$ is an edge of $G$, it holds that $f(x) \neq f(y)$. (Because otherwise $f(x)f(y)$ would be a loop in $H$).
On the other hand, allowing loops leads to a more lenient notion of homomorphism: under this definition, a homomorphism can collapse an enormous graph $G$ to a tiny graph $H$ with only one vertex and one edge.
 A: Your observation that endpoints of an edge cannot map to the same vertex if one disallows loops (i.e. considers only graphs without loops) comes from the property that $H$ has no loops. Allowing a non-injective map (vertex-wise) still cannot lead to such a collapse if $H$ has no suitable loops. Note that we still have non-injective homomorphisms e.g. when mapping cycle graphs $C_6\to C_3$ for example, so such "collapse" in itself is not a problem per se.
However, with non-simple graphs, i.e. if we allow loops and maybe also multiple edges (possibly directed), I'd suggest to define a morphism as a map $f\colon V_G\to V_H$ on the vertices together with a map $g\colon E_G\to E_H$ on the edges such that if $e$ is an edge from $v$ to $w$, then $g(e)$ is an edge from $f(v)$ to $f(w)$.
A: The definition is the same in both cases: with or without loops. The question is whether you want to apply it to graphs without loops, or graphs with loops (or even to directed graphs). Technically we have a choice of categories, each with their own collections of results and theorems. You get to choose the class of "graphs" you will work with. 
The one most people meet first is graphs with no loops, and the problems that arise there can be viewed as generalizations of coloring problems.
