I found in several different fonts, (in the first section of this (https://arxiv.org/abs/alg-geom/9405004) paper, or even in this answer (https://mathoverflow.net/questions/212960/intuition-behind-basic-facts-about-homogeneous-ideals) here in MSE) the following claim
Let $X$ be an affine variety and $A$ its coordinate ring. Then to give a $\mathbb{Z}$ grading on $A$ is equivalent to give a $\mathbb{G}_m=k^{\times}$ action on $X$.
This fact seems to be well known although I did not find any book or paper that proves it. Does anyone know a reference?
For one side if one has a $\mathbb{G}_m=k^{\times}$ action on $X$, it is easy to build a $\mathbb{Z}-$grading on $A$. One considers the following action of $\mathbb{G}_m$ on $A$, if $f \in A$ then $t.f(x) = f(t^{-1}.x)$. In this way, the grading on $A$ will be given by $A_d = \{f\in A; t.f = t^nf\}$.
My problem is on the other side. I can not prove that if I have a $\mathbb{Z}$ grading on $A$, then I can found an action of $\mathbb{G}_m$ on $X$. Is there something easy that I am missing?
Thanks in advance.