Subscription Schema
Available Subscriptions
contentUpdated
Watch for updates to published content
previewUpdated
Watch for updates to draft previews
WebSocket Client Setup
Subscriptions are served fromwss://ws-api.metabind.ai, which is a different
host from the one queries and mutations use. api.metabind.ai is an HTTP API
and cannot accept a WebSocket upgrade, so pointing a subscription client at it
will never connect.
Note the ?protocol=graphql-transport-ws query parameter. graphql-ws clients
normally negotiate the subprotocol through the Sec-WebSocket-Protocol header,
but API Gateway does not forward that header to the backend — the query
parameter is what selects the GraphQL protocol, and the connection is treated
as a plain realtime socket without it.
Use wss://ws-api-dev.metabind.ai for the dev environment.
Using graphql-ws
For Preview Subscriptions
UsepreviewToken instead of x-api-key:
Handling Large Payloads
AWS WebSocket has a 100KB payload limit. When data exceeds this limit:- The
contentorcomponentfield will benull - The
resolvedReffield is always included - Fetch the full data separately using the ID
- Use the
resolvedRefto fetch package data
Related
- Subscription Types - ContentUpdate, PreviewUpdate type definitions
- Caching - Normalized package caching for subscriptions