Recently, Alon initiated the study of graph codes and their linear variants in analogy to the study of error correcting codes in theoretical computer science. Alon related the maximum density of a linear graph code which avoids images of a small graph H to the following variant of the ErdÅs-Gyárfás problem on edge-colourings of Kn. A copy of H in an edge-colouring of Kn is even-chromatic if each colour occupies an even number of edges in the copy. We seek an edge-colouring of Kn using no(1) colours such that there are no even-chromatic copies of H. Such an edge-colouring is conjectured to exist for all cliques Kt with an even number of edges. To date, edge-colourings satisfying this property have been constructed for K4 and K5. We construct an edge-colouring using no(1) colours which avoids even-chromatic copies of K8. This was the smallest open case of the above conjecture, as K6,K7 each has an odd number of edges. We also study a stronger condition on edge-colourings, where for each copy of H, there is a colour occupying exactly one edge in the copy. We conjecture that an edge-colouring using no(1) colours and satisfying this stronger requirement exists for all cliques Kt regardless of the parity of the number of its edges. We construct edge-colourings satisfying this stronger property for K4 and K5. These constructions also improve upon the number of colours needed for the original problem of avoiding even-chromatic copies of K4 and K5.