Support factory instantiation of graphs.