Let K be an infinite field of characteristic different from two and let U 1 be the Lie algebra of the derivations of the algebra of Laurent polynomials K[t, t −1 ]. The algebra U 1 admits a natural Z-grading. We provide a basis for the graded identities of U 1 and prove that they do not admit any finite basis. Moreover, we provide a basis for the identities of certain graded Lie algebras with a grading such that every homogeneous component has dimension ≤ 1, if a basis of the multilinear graded identities is known. As a consequence of this latter result we are able to provide a basis of the graded identities of the Lie algebra W 1 of the derivations of the polynomial ring K[t]. The Z-graded identities for W 1 , in characteristic 0, were described in [8]. As a consequence of our results, we give an alternative proof of the main result, Theorem 1, in [8], and generalize it to positive characteristic. We also describe a basis of the graded identities for the special linear Lie algebra slq(K) with the Pauli gradings where q is a prime number.