@actyx/pond: queryKnownRangeChunked does no longer return Promise

Description
Since the pond update to v3, pond.events().queryKnownRangeChunked does no longer return a Promise, but a CancelSubscription function. The documentation still states “@returns A Promise that resolves when all chunks have been delivered to the callback.” Without this, there is no way for me to do a chunked execute-once query, that doesn’t subscribe to something.
Expected behavior
queryKnownRangeChunked should return a Promise that resolves after every event-chunk was processed by the callback.
Configuration
@actyx/pond": “^3.0.1”

Hello there, thanks for the bug report!

The change in functionality is intended: To be consistent with the other functions, queryKnownRangeChunked now also returns a CancelSubscription.
To rebuild the old behavior:
const allDelivered = new Promise(resolve => actyx.queryKnownRangeChunked(query, chunkSize, onChunk, resolve)

The doc slipped through, will release a version 3.0.2 with the proper @return.

Cheers!

1 Like

Thanks, that helped!