streamQueryKeys method
Streams all changes by keys in the store that match the given filter.
Requests a stream from the server and returns that stream. The stream
will initially report a KeyEvent.reset with all keys in the store that
match filter
and then send other events, as data is modified on the
server in realtime. It will only send events for modified data that
matches filter
for created and deleted keys, but also for keys that only
had their values changed (but the key stayed the same).
Implementation
Future<Stream<KeyEvent>> streamQueryKeys(Filter filter) async {
final stream = await restApi.stream(
path: _buildPath(),
filter: filter,
);
return stream.transform(const StoreKeyEventTransformer());
}