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

feat: grpc-web support #102

Merged
merged 13 commits into from
Nov 19, 2022
Merged

feat: grpc-web support #102

merged 13 commits into from
Nov 19, 2022

Conversation

thesayyn
Copy link
Owner

@thesayyn thesayyn commented Dec 2, 2021

This is a branch for the initial support for the generation of grpc-web compatible clients. protoc-gen-ts always supported grpc-web but the generated source files that are generated through protoc-gen-grpc-web have always required manual intervention such as replacing imports to use protoc-gen-ts counterpart of generated pb.

Currently, one has to change imports require("./type_pb") with require("./type")

With native support of grpc-web clients, one will only have to present --ts_opt=target=web to generate grpc-web compatible clients instead of nodejs.

web implementation supports the official grpc-web implementation. other implementations such as improbable-eng/grpc-web can be added later if there is community interest!

supported RPC types are as follows;

  • UNARY
  • SERVER_STREAMING

closes #97

@thesayyn thesayyn force-pushed the grpc-web branch 2 times, most recently from d176996 to 53044f2 Compare December 5, 2021 11:22
@thesayyn thesayyn mentioned this pull request Dec 6, 2021
@eyouyou
Copy link

eyouyou commented Jul 1, 2022

any progress?

@thesayyn
Copy link
Owner Author

@eyouyou I am going to put effort into this week. I made it work with a go server with rollup + typescript on the web.

@thesayyn thesayyn force-pushed the grpc-web branch 4 times, most recently from 0cb8f88 to e6ca731 Compare November 18, 2022 07:39
@thesayyn thesayyn marked this pull request as ready for review November 18, 2022 07:39
@thesayyn thesayyn force-pushed the grpc-web branch 3 times, most recently from 1113e30 to d7246b7 Compare November 18, 2022 10:21
@thesayyn thesayyn force-pushed the grpc-web branch 15 times, most recently from 9997868 to 8fca833 Compare November 18, 2022 14:29
@thesayyn thesayyn merged commit 1708f7f into main Nov 19, 2022
@thesayyn thesayyn deleted the grpc-web branch November 19, 2022 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web support
2 participants