WebSockets

Templates

Templates are reusable message snippets. Stop pasting the same JSON every time.

Creating a template

Templates → New template. Give it a name and put any text or JSON in the content field.

Using a template in the tester

From the tester:

  1. Open a connection.
  2. Click the templates icon in the side panel.
  3. Pick a template — it loads into the composer.
  4. Edit if needed, then send.

Common templates

A few that come up often:

  • {"type":"ping"}Heartbeat for servers that expect periodic pings.
  • {"type":"subscribe","channel":"orders"}Subscribe to a channel.
  • {"type":"connection_init","payload":{}}GraphQL-WS connection initialization.

Tips

  • Prefix templates with the protocol (e.g. "GQL — connection_init").
  • Pretty-print before saving.
  • Templates are per-account.