stephenh / ts-proto

An idiomatic protobuf generator for TypeScript
Apache License 2.0
1.96k stars 324 forks source link

NestJS without Observables #1020

Open aabrams opened 1 month ago

aabrams commented 1 month ago

I'm using version 1.170 with nestJs=true

I'm seeing gRPC services with Observable, no matter how I configure returnObservable.

I think the correct behavior is to return observable only for stream responses, is there a way to configure it so?

Thanks!

stephenh commented 1 month ago

Hi @aabrams , honestly I'm not a NestJS expert or user, but can just point you to this line in the ts-proto source code:

    // Return observable since nestjs client always returns an Observable
    const returns = responseObservable(ctx, methodDesc);

That is from awhile ago, so if the situation has changed (or maybe was never true :shrug: ), and you're willing to submit a PR to fix it, that'd be great! Thanks!