cgi/g: handle graph_order