gRPC, GraphQL and Protobuf

Read the places modern APIs report failure: gRPC trailers, GraphQL errors under a 200, and Protobuf with or without your schemas.

Mac iPhone and iPad Android

gRPC and GraphQL both answer 200 OK and report failure somewhere else. WireLens reads where these protocols put the outcome and marks the flow when the call failed.

All of this needs decrypted traffic: the host has to be on the SSL Proxying list. See SSL Proxying.

gRPC#

gRPC reports success or failure after the body, in the grpc-status and grpc-message trailers. WireLens keeps them, passes them to your app unchanged, and reads them:

  • Mac: a failed call is marked Payload Error with a note such as gRPC NOT_FOUND: …, even though HTTP said 200. The response's Trailers tab shows the trailers, and the Operation column names the method.
  • iPhone and iPad: the response shows Response Trailers. In the filter Scopes, Flags has gRPC and Payload error (200 that failed).
  • Android: the request's Overview shows the gRPC method and the gRPC status, and the response shows its Trailers.

On the Mac and on iPhone and iPad:

  • Streaming works. Client-streaming and two-way calls are passed along as they arrive. A request body that is still arriving cannot be mocked, rewritten or paused; responses still can.
  • gRPC-Web and responses that carry their status in the headers are understood too.

gRPC needs HTTP/2 to the server, and WireLens speaks it on both legs. See HTTP/2, HTTP/3 and QUIC.

On the Mac, the gRPC chip shows every call, and operation: finds a method by name, such as operation:GetStock.

GraphQL#

Every GraphQL request tends to be POST /graphql, which makes a plain traffic list a column of identical rows. WireLens reads the operation instead:

  • The operation name appears on the flow: in the Operation column on the Mac, and as Operation in the Android Overview. On the Mac, operation:CheckoutMutation finds it.
  • An errors array in a 200 response is flagged as a failure. The body shows a banner such as GraphQL error: … on all three platforms, and the Mac marks the flow Payload Error.
  • A request body has Query and Vars views for the document and its variables, on the Mac and on iPhone and iPad.
  • Batches, persisted queries, GET ?query= requests and subscriptions over WebSocket are recognised.

The GraphQL chip lists GraphQL traffic on the Mac and on iPhone and iPad.

Protobuf#

Protobuf bodies decode with no setup on all three platforms: WireLens reads the wire format and shows field numbers and values. On Android, choose Protobuf in the body's view picker.

Your schemas (Mac)#

For field names instead of numbers, give WireLens a descriptor set in Settings ▸ Protobuf:

  1. Build one from your .proto files, for example with protoc --include_imports --descriptor_set_out=schema.desc *.proto. A descriptor set as JSON works too.
  2. Under Descriptor source, click Choose… and pick the file.
  3. Turn on Use imported schema in inspectors. Status shows Loaded with the number of messages and services.

Matching gRPC and Protobuf bodies then show your field names; everything else stays as field numbers. Remove source forgets the file. The file is read where it is, up to 8 MiB.

wirelens ships inside the app and is not on your PATH until you link it once.

bash
wirelens rules protobuf --path schema.desc
wirelens rules protobuf off

From an agent, the MCP tool set_protobuf_schema does the same. See MCP for AI agents.

Something here is unclear, or wrong for your setup? Contact support or write to support@wirelens.app.