Structured Codes of Graphs