Let $G_X = (X, \mathcal{E}_X)$ and $G_Y = (Y, \mathcal{E}_Y)$ each be a D778: Graph.
A D18: Map $f : X \to Y$ is a graph homomorphism from $G_X$ to $G_Y$ if and only if
\begin{equation}
\forall \, x, y \in X
\left( \{ x, y \} \in \mathcal{E}_X \quad \implies \quad \{ f(x), f(y) \} \in \mathcal{E}_Y \right)
\end{equation}