Skip to content

Conversation

@dmdashenkov
Copy link
Contributor

@dmdashenkov dmdashenkov commented Jul 16, 2021

In this PR we expose the asynchronous nature of the event and state subscriptions to the user.
Previously, the user received an EventSubscription<..>/StateSubscription<..> right away after calling post(..). This, however, does not reflect the reality of subscriptions on the server being created eventually. The returned object used to hide a Future which ought to complete when the subscription reaches the server.

Now, the post(..) and similar methods return not a subscription, but a Future. This should let the user know that the subscription is not yet "live".

This fixes #32.

Also, in this PR we add wrappers with a common interface for FIlter and CompositeFilter. This allows users to pass a singleFilter into where(..). Previously, the users had to wrap the filter into all([..]) manually each time.

This fixes #31.

@dmdashenkov dmdashenkov self-assigned this Jul 16, 2021
@dmdashenkov
Copy link
Contributor Author

@dmytro-kashcheiev, FYI.

@dmdashenkov dmdashenkov marked this pull request as ready for review July 16, 2021 13:12
@dmdashenkov dmdashenkov requested a review from armiol July 16, 2021 13:12
@dmdashenkov
Copy link
Contributor Author

@armiol, PTAL.

@dmdashenkov dmdashenkov merged commit 2469efb into master Jul 17, 2021
@dmdashenkov dmdashenkov deleted the async-subscriptions branch July 17, 2021 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify subscription async API Add possibility to filter by one field with QueryRequest

3 participants