Skip to content
This repository was archived by the owner on Jan 8, 2026. It is now read-only.

Latest commit

 

History

History
50 lines (42 loc) · 639 Bytes

File metadata and controls

50 lines (42 loc) · 639 Bytes

Streaming RPC / Subscription

How to run

cd examples/subscription
./start.sh

Then, open http://localhost:4000 in browser.

Generated GraphQL schema

Subscription example:

subscription  {
  serverStreaming(request:{
    names:["Rust","ProtoBuf","GraphQL"]
  }){
    message
  }
}

Result:

{
  "data": {
    "serverStreaming": {
      "message": "Hello Rust!"
    }
  }
}
{
  "data": {
    "serverStreaming": {
      "message": "Hello ProtoBuf!"
    }
  }
}
{
  "data": {
    "serverStreaming": {
      "message": "Hello GraphQL!"
    }
  }
}