AI agents: fetch the documentation index at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.
@stratasync/transport-graphql
GraphQL and REST transport adapter for sync communication, delta subscriptions, and Yjs collaborative editing in Strata Sync.
Implements TransportAdapter with NDJSON bootstrap streaming, REST/GraphQL mutations, WebSocket delta subscriptions, and Yjs collaborative editing: all with built-in retry and exponential backoff.
What it provides
createGraphQLTransport: factory function that creates a configuredTransportAdapterinstanceGraphQLTransportAdapter: the class implementing the fullTransportAdapterinterfaceWebSocketManager: manages WebSocket connections for delta subscriptions with automatic reconnectionYjsTransportAdapter: bridges Yjs protocol messages over the WebSocket connection- Bootstrap streams:
createBootstrapStreamandcreateBatchLoadStreamfor NDJSON streaming - Delta fetching:
fetchDeltasandfetchAllDeltasfor REST-based catch-up - Mutation sending:
sendMutations(GraphQL) andsendRestMutations(REST) - Retry utilities:
retryWithBackoff,calculateBackoff,fetchWithTimeout, error classification helpers
Installation
npm install @stratasync/transport-graphql@stratasync/transport-graphql has no peer dependencies. It depends on @stratasync/core and @stratasync/y-doc as workspace dependencies.