grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.51k stars 766 forks source link

Introducing new Enum value doesn't result in default value in client #1262

Open agoodsell5 opened 2 years ago

agoodsell5 commented 2 years ago

We have a client generated using protoc with the Typescript option included and are then making requests using grpc-web.

We recently introduced a new value to an enum, and as we are following the proto guidelines of have a default value assigned to 0 for the first value of the enum, we expected the the client to default to this value until it was updated and made aware of the new enum value.

This does not seem to have happened, instead the int value of the enum is present.

Is there a setting that can be applied so that the default enum value is used in the situation the client is unaware of the enum value?

sampajano commented 2 years ago

Hi thanks for the report!

could you explain a bit more about what you mean by "instead the int value of the enum is present"?

Potentially with a short code snippets? Thanks!