Sending gRPC request in node without .proto file

451 Views Asked by At

I have a NextJS with Typescript application. I want to connect to a running gRPC server and send gRPC requests to the server. I do not have access to the .proto file, but I know the server address, service name, messages names and fields. I can't find any information which allows me to send requests without having a .proto file in my NextJS folder structure. How can I achieve this desired functionality?

Here are two things that may help guide a solution:

  1. I have access to the raw contents of a .proto file. I access this via the Gitlab API, but I cannot have the .proto file in my application. I have created a parser to parse this into an object so that I have access to the services, messages and fields.

  2. Each gRPC connection (I don't know the terminology) is wrapped in reflection, so I can use reflection on the gRPC server. However, I have not found anything that allows me to do that without having the .proto file.

Thank you for your time

0

There are 0 best solutions below