Graph states are generalized from qubits to collections of n qudits of arbitrary dimension D, and simple graphical methods are used to construct both additive and nonadditive, as well as degenerate and nondegenerate, quantum error correcting codes. Codes of distance 2 saturating the quantum Singleton bound for arbitrarily large n and D are constructed using simple graphs, except when n is odd and D is even. Computer searches have produced a number of codes with distances 3 and 4, some previously known and some new. The concept of a stabilizer is extended to general D, and shown to provide a dual representation of an additive graph code.