-
Notifications
You must be signed in to change notification settings - Fork 349
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
feat: Grpc web stream (Promise/Observable) #633
base: main
Are you sure you want to change the base?
Conversation
grpcWebMixObservable default is true. It mean: - unary method use Promise response type. - client streaming or server streaming use Observable response type. - default parameters.txt is `outputClientImpl=grpc-web` equal to `outputClientImpl=grpc-web,returnObservable=false,grpcWebMixObservablePromise=true` If you want all method return Observable response type, only set `outputClientImpl=grpc-web,returnObservable=true`. If you want all method return Promise response type, setting: `outputClientImpl=grpc-web,grpcWebMixObservablePromise=false`.
try to add
If you want all method return Observable response type, only set If you want all method return Promise response type, setting: |
This break change already compatiable by |
@stephenh You can take a look, it's nice to merge into master. Thanks!! |
Hey @luhuaei I'll try to have a look at this soon. Big patch, lots to review |
Thanks! If you have any questions, feel free to ask. |
Hi, Any news here? We also need streaming support |
Support grpc-web Promise stream and Observable stream.
Note
If you use
returnObservable options
allservice methods
will returnObservable
type. Without this parameter, it will default toPromise
type.That is, if
returnObservable
is specified, there will be no return type ofPromise
, and vice versa.This will cause the original generated code to be changed, like the previous generated code,
server stream method
will returnObservable
regardless of whetherreturnObservable
is specified or not. (#337 )cc @paralin