Pass query-function a ResumableChunk.

To be able to add query-parameters depending on the current chunk being
processed, the query-function should receive a ResumableChunk as second
parameter.