On the graded algebra relative to a valuation