old-graph: Move graph API into the common graph struct