Instead of making create_edges([single_edge]) request for every edge of item, call create_edges(all_edges) once.
create_edges([single_edge])
create_edges(all_edges)