In this paper we investigate composition operators on discrete spaces. We establish classification of underlying graphs of such operators. For one class of such graphs, namely graphs with one cycle, we obtain a characterization of m-isometries. The paper contains also the solution of the Cauchy dual subnormality problem for composition operators on graphs with one cycle.