Changed idx => graph_id to be consistant across tables