RAW server-side subscription-set management — ADVANCED / low-level.
Prefer synthigy.client/watch and synthigy.client/watch-query: the watch
multiplexer manages this same server-side set automatically (union of all
watch interests, re-asserted on every SSE reconnect).
WARNING: the server keeps ONE subscription set per client identity and
/data/subscription/set is FULL-REPLACE. Calling these fns while any
watch/watch-query is active on the same client CLOBBERS the multiplexer's
set (and vice versa) — live updates silently stop. Use this namespace only
when you consume /data/events yourself via synthigy.client/listen and
no watches are open.
RAW server-side subscription-set management — ADVANCED / low-level. Prefer `synthigy.client/watch` and `synthigy.client/watch-query`: the watch multiplexer manages this same server-side set automatically (union of all watch interests, re-asserted on every SSE reconnect). WARNING: the server keeps ONE subscription set per client identity and `/data/subscription/set` is FULL-REPLACE. Calling these fns while any watch/watch-query is active on the same client CLOBBERS the multiplexer's set (and vice versa) — live updates silently stop. Use this namespace only when you consume `/data/events` yourself via `synthigy.client/listen` and no watches are open.
RAW server-side subscription-set management — ADVANCED / low-level (ClojureScript, promise-returning).
Prefer the watch layer: the server keeps ONE subscription set per client
identity and /data/subscription/set is FULL-REPLACE — mixing this with
any watch machinery on the same client clobbers its set. Use only when
consuming /data/events yourself via synthigy.client/listen.
RAW server-side subscription-set management — ADVANCED / low-level (ClojureScript, promise-returning). Prefer the watch layer: the server keeps ONE subscription set per client identity and `/data/subscription/set` is FULL-REPLACE — mixing this with any watch machinery on the same client clobbers its set. Use only when consuming `/data/events` yourself via `synthigy.client/listen`.
(clear-subscriptions)Remove all subscriptions for this session.
Remove all subscriptions for this session.
Remove all subscriptions for this session. Returns a Promise.
Remove all subscriptions for this session. Returns a Promise.
(set-subscriptions descriptors)Replace the entire record-subscription set in one call. descriptors
is a seq of {:records [...] :operations [...]?} maps. Clears any
entity/relation/model subs.
Replace the entire record-subscription set in one call. `descriptors`
is a seq of {:records [...] :operations [...]?} maps. Clears any
entity/relation/model subs.Replace the record-subscription set. Returns a Promise.
Replace the record-subscription set. Returns a Promise.
(subscribe xids)(subscribe xids {:keys [operations key]})Subscribe to change notifications for specific record xids.
Records-scoped per the wire contract. Returns a handle (string) to
pass to unsubscribe. Re-subscribing the same records is idempotent.
Options: :operations — seq narrowing to an op subset (e.g. [:update :link]) :key — custom handle (default: a stable hash of the records)
Subscriptions are mirrored client-side and persist on the server per client identity, surviving SSE reconnects.
Subscribe to change notifications for specific record `xids`. Records-scoped per the wire contract. Returns a handle (string) to pass to `unsubscribe`. Re-subscribing the same records is idempotent. Options: :operations — seq narrowing to an op subset (e.g. [:update :link]) :key — custom handle (default: a stable hash of the records) Subscriptions are mirrored client-side and persist on the server per client identity, surviving SSE reconnects.
Subscribe to change notifications for record xids. Returns a Promise
resolving to the handle string. Options: :operations :key.
Subscribe to change notifications for record `xids`. Returns a Promise resolving to the handle string. Options: :operations :key.
(subscribe-entity entities)Subscribe to ALL change notifications for whole entities (seq of
entity names). Use this to tail an entity without knowing record ids
up front.
Subscribe to ALL change notifications for whole `entities` (seq of entity names). Use this to tail an entity without knowing record ids up front.
Subscribe to ALL changes for whole entities. Returns a Promise.
Subscribe to ALL changes for whole `entities`. Returns a Promise.
(subscribe-model & {:keys [raw]})Subscribe to model-deploy notifications. :raw true watches the raw
deployed model; default watches the runtime model.
Subscribe to model-deploy notifications. `:raw true` watches the raw deployed model; default watches the runtime model.
Subscribe to model-deploy notifications. Returns a Promise.
Subscribe to model-deploy notifications. Returns a Promise.
(subscriptions)Return the server's view of this client's current subscriptions.
Return the server's view of this client's current subscriptions.
Return the server's view of this client's current subscriptions. Returns a Promise.
Return the server's view of this client's current subscriptions. Returns a Promise.
(unsubscribe handle)Remove a record subscription by its handle (from subscribe).
Unknown handles are a no-op.
Remove a record subscription by its `handle` (from `subscribe`). Unknown handles are a no-op.
Remove a record subscription by handle. Returns a Promise.
Remove a record subscription by `handle`. Returns a Promise.
(unsubscribe-entity entities)Remove entity-level subscriptions for entities.
Remove entity-level subscriptions for `entities`.
Remove entity-level subscriptions for entities. Returns a Promise.
Remove entity-level subscriptions for `entities`. Returns a Promise.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |