How to call a yield statement within apoc.iterate?

I'm wondering if it's possible to include something like apoc.create.setProperty or apoc.refactor.invert inside an iterate statement. Something like:

CALL apoc.periodic.iterate("MATCH ()-[rel:RELATED]->() RETURN rel", 
"CALL apoc.refactor.invert(rel) YIELD input, output RETURN input, output",
{batchSize:1000, parallel: true})
YIELD batches, total RETURN batches, total

Yield doesn't mesh well with the way iterate works so I can't think of a way to make this work. Anyone have any thoughts?

Sure, you just have to yield one of the result columns and return a count(*) to make it a valid statement.

changing rels in parallel might get you a lot of locking esp. before 4.3

CALL apoc.periodic.iterate("MATCH ()-[rel:RELATED]->() RETURN id(rel) as id", 
"MATCH ()-[rel:RELATED]->() WHERE id(rel) = id WITH * 
 CALL apoc.refactor.invert(rel) YIELD output RETURN count(*)",
{batchSize:1000, parallel: true})
YIELD batches, total RETURN batches, total