modify handlers to accept query string

Given that ``cursor`` has to be available straight away, maybe ``objs`` should just be a list of objects? I doubt one will be able to know the final cursor until all objects have been retrieved anyway? And unlike in ``write_objects`` we're not streaming results back.