The graph(1) $G$ of the function $f:X\to Y$ is the set $\{(x,f(x)):x \in X\}$. Unless I'm mistaken, this can be interpreted as a directed, bipartite graph(2) where every vertex in one of the partitions (domain) has out-degree $1$ and in-degree $0$. The other partition is the image.
CLARIFICATION: graph(2) refers to the graph-theoretic definition of graph, distinct from graph(1)
According to the post Difference between a function and a graph of a function?, the difference between a function $f$ and its graph $G$ is that the function's codomain cannot be recovered from the graph.
However, the domain of $f$ could be recovered from the disjoint union of $G$ with a second graph $H$ of isolated vertices which satisfies the condition -- the union of the set of vertices in $H$ and the set of vertices in the image partition of $G$ is the codomain.
Could you then say that $f$ is equivalent to $G\oplus H$ up to an isomorphism? Is there any benefit to viewing functions as a specific type of graph?