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

Support .map() that returns ResponseStream instead of Stream #689

Open
maherjaafar opened this issue Jan 31, 2024 · 4 comments
Open

Support .map() that returns ResponseStream instead of Stream #689

maherjaafar opened this issue Jan 31, 2024 · 4 comments

Comments

@maherjaafar
Copy link

maherjaafar commented Jan 31, 2024

keeping the return type as ReponseStream to be able to call .cancel() after using .map()

Used version: grpc: 3.2.4

Example

    final ReponseStream myStream = _client
        .myReponseStream
        .listen((event) => event.map((event) => event.value));

Expected result: I expect to get result of type ReponseStream but the result will be of type Stream

Actual result: Stream

@maherjaafar
Copy link
Author

Any updates?

@maherjaafar
Copy link
Author

@mosuem any updates?

@mosuem
Copy link
Contributor

mosuem commented Apr 19, 2024

Hi @maherjaafar, I am not sure what you mean. Where does this WatchEventsRequest come from?

@maherjaafar
Copy link
Author

@mosuem It's just an example. I changed it⬆️

The issue arises when I use .map, as it converts it to a Stream instead of a ResponseStream. Consequently, I lose the ability to call myResponseStream.cancel() to cancel the stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants