Let $f:X\rightarrow Y$ be a continuous function and $G_f$ be its graph. I want to prove that the function $$h:X\rightarrow G_f \\ x\mapsto (x,f(x))$$ is an homeomorphism.
I am aware of the question Proving a homeomorphism when graph of function has product topology. The answer given there did not answer my particular doubts.
My attempt:
Each component of $h$ is continuous, so $h$ is continuous.
Let $x,y\in X$ with $h(x)=h(y)$. Then, $(x,f(x))=(y,f(y))$. In particular, $x=y$, so $h$ is injective.
Let $(x,y)\in G_f$. Then, $y=f(x)$. If we take the point $x$ of $X$ we get $h(x)=(x,y)$, so $h$ is surjective.
We now have to establish the continuity of $h^{-1}$. Let $U$ be an open set of $X$. I want to prove that $(h^{-1})^{\dashv}(U)$ is an open set of $G_f$ (i.e. that there is an open set $A$ of $X\times Y$ such that $(h^{-1})^{\dashv}(U)=A\cap G_f$).
Questions:
$\bullet$ How to finish the proof?
$\bullet$ I've read that it suffices to show that $h$ is open, but I have to idea why.