gRPC is currently available for on premise deployments and supports unary requests and responses today.
In addition to REST and GraphQL based APIs, Retool supports connecting to services via gRPC. Here is how you can setup gRPC endpoints for your deployment.
On the host machine create a protos/ folder and add the .proto files into there
to the 3 volume sections for api, db-connector and db-ssh-connector
docker.env add the path to the proto files
Retool will automatically include the Google proto files and the
/retool_backend/protos folder in the include directories. If your proto files use imports which rely on a different base folder you can add that directory to the
PROTO_IMPORT_DIRECTORY_PATH env variable and it will also include that path.
sudo docker-compose up -d
Now that your proto files are setup you should be able to select gRPC under APIs and see the service names for your proto files in the list:
For self signed certs you can set the path to the
.pem file in the
NODE_EXTRA_CA_CERTS environment variable: https://docs.retool.com/docs/custom-internal-ca
For client side certs you can add those into the resource form:
Once you have a resource connected you can create a query using it. The methods/rpc’s for that service will be available in the query. Placeholder JSON is generated to match the Request message.
Then you can use your query in your apps
Let us know if you have any questions or run into any roadblocks!
Updated 4 months ago