Guide

WebSockets, GraphQL and WebRTC

### Echo
WS wss://ws.postman-echo.com/raw

> send json({ type: "hello", from: person(1).name })
> receive 5s
> assert data.type == "hello"
> wait 500ms
> send "ping"
> receive 5s
> assert message == "ping"
> close

In a WS script: send, receive 5s (then message and data), wait and close. The app shows the exchange as a conversation.

A WebSocket request: send and receive lines, and the messages that came back
A WebSocket request: send and receive lines, and the messages that came back
### Country
GRAPHQL {{countries}}

query Country($code: ID!) {
  country(code: $code) { name capital emoji }
}

{ "code": "CH" }

> assert body.errors == null
> assert body.data.country.capital == "Bern"

A GRAPHQL request takes the query, then a blank line, then the variables as JSON. STUN and TURN requests check WebRTC servers and report the mapped address, the round trip and whether you are behind NAT.

Back: Race conditions Next: MCP servers