gRPC & Protobuf


This handler allows you to load gRPC definition files (.proto).

$ yarn add @graphql-mesh/grpc

Now, you can use it directly in your Mesh config file:

- name: MyGrpcApi
endpoint: localhost:50051
protoFilePath: grpc/proto/Example.proto
serviceName: Example
packageName: io.xtech.example

You can check out our example that uses gRPC Handler. Click here to open the example on GitHub

Config API Reference

  • endpoint (type: String, required) - gRPC Endpoint
  • protoFilePath - - gRPC Proto file that contains your protobuf schema (required) One of:
    • object:
      • file (type: String, required)
      • load (type: Object):
        • includeDirs (type: Array of String)
    • String
  • serviceName (type: String) - Your base service name Used for naming only
  • packageName (type: String) - Your base package name Used for naming only
  • requestTimeout (type: Int) - Request timeout in milliseconds Default: 200000
  • credentialsSsl (type: Object) - SSL Credentials:
    • rootCA (type: String)
    • certChain (type: String)
    • privateKey (type: String)
  • metaData (type: JSON) - MetaData