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

fix: Wrapping / Unwrapping Value well-known type in request/response serializers #951

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

moufmouf
Copy link
Contributor

Values of type google.protobuf.Value were not correctly wrapped/unwrapped when directly passed to a service (as a request or response).

As a result, calls to a service written like this:

service RoomApi {
    rpc echo(google.protobuf.Value) returns (google.protobuf.Value);
}

had to be written:

const value = Value.unwrap(await client.echo(Value.wrap({}));

instead of:

const value = await client.echo({});

This commit fixes this.

This should close #947

…lizers

Values of type google.protobuf.Value where not correctly wrapped/unwrapped when
directly passed to a service (as a request or response).
@moufmouf moufmouf changed the title Wrapping / Unwrapping Value well-known type in request/response serializers fix: Wrapping / Unwrapping Value well-known type in request/response serializers Oct 13, 2023
@stephenh
Copy link
Owner

This is a great PR @moufmouf , thank you!

It's especially nice that you found an integration test with a *.proto file that already covered this use case, and just needed tweaked to do the right thing. 🎉

@stephenh stephenh merged commit d30ffa2 into stephenh:main Oct 14, 2023
6 of 7 checks passed
@stephenh
Copy link
Owner

🎉 This PR is included in version 1.162.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Support Values as service return values
2 participants