-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc module: add call_and_subscribe
#588
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sold on this. Couldn't the code in substrate (and cumulus I believe) could be refactored to use test_subscription
instead?
Not going to make a fuss, but the API is growing larger than I'd like.
Nah, it would panic if the response wasn't a subscription response but I get your point it's getting messy. For cumulus and substrate (for testing) it's fine but it's a breaking change for users that actually is using this for subscriptions. |
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
…tion' into na-rpc-module-call-with-subscription
@dvdplm can you take another look at this? I think we should remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few changes to the docs.
I agree and I think I tried it but ran into some kind of issue that made me stop trying. |
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
* rpc module: add `call_and_subscribe` * Update utils/src/server/rpc_module.rs Co-authored-by: David <dvdplm@gmail.com> * Update types/src/v2/response.rs Co-authored-by: David <dvdplm@gmail.com> * grumbles * fix rustdoc links * Update utils/src/server/rpc_module.rs Co-authored-by: David <dvdplm@gmail.com> * Update utils/src/server/rpc_module.rs Co-authored-by: David <dvdplm@gmail.com> Co-authored-by: David <dvdplm@gmail.com>
Needed to support
in memory queries
in substrate with "optional subscriptions`, example hereThis might be useful elsewhere too but I think we should refactor this in
v0.7
many similar functions there now.It won't work unless we expose
receiver
of the stream which this does.