Skip to content
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

Add observable support to grpc-web clients #129

Closed
PhilipMantrov opened this issue Sep 9, 2020 · 3 comments
Closed

Add observable support to grpc-web clients #129

PhilipMantrov opened this issue Sep 9, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@PhilipMantrov
Copy link
Contributor

--ts_proto_opt=outputClientImpl=grpc-web,returnObservable=true
All methods (except stream methods) still promise.

@stephenh
Copy link
Owner

stephenh commented Sep 9, 2020

Yeah, that combination of options is not supported. returnObservable only works with the nestjs output.

@stephenh stephenh changed the title returnObservable=true probably not working Add observable support to grpc-web clients Sep 9, 2020
@stephenh stephenh added the enhancement New feature or request label Sep 9, 2020
@PhilipMantrov
Copy link
Contributor Author

PhilipMantrov commented Sep 10, 2020

After some investigation i realize what wrong with Observable for stream methods: In interface we have forced Observable (and i find why you doing this (hello nestjs implementation and past issue (#59)), but in method we have grpc.unary with Promise returned.

For stream methods we need to use grpc.invoke.

Tomorrow i create pr for this feature.

@stephenh
Copy link
Owner

Pretty this is fixed, and just forgot to close the issue.

zfy0701 pushed a commit to sentioxyz/ts-proto that referenced this issue Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants