Liking cljdoc? Tell your friends :D

synthigy.client.subscriptions

clj

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.
cljs

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`.
raw docstring

clear-subscriptionsclj/s≠

(clear-subscriptions)
clj

Remove all subscriptions for this session.

Remove all subscriptions for this session.
cljs

Remove all subscriptions for this session. Returns a Promise.

Remove all subscriptions for this session. Returns a Promise.
source (clj)source (cljs)raw docstring

set-subscriptionsclj/s≠

(set-subscriptions descriptors)
clj

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.
cljs

Replace the record-subscription set. Returns a Promise.

Replace the record-subscription set. Returns a Promise.
source (clj)source (cljs)raw docstring

subscribeclj/s≠

(subscribe xids)
(subscribe xids {:keys [operations key]})
clj

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.
cljs

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.
source (clj)source (cljs)raw docstring

subscribe-entityclj/s≠

(subscribe-entity entities)
clj

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.
cljs

Subscribe to ALL changes for whole entities. Returns a Promise.

Subscribe to ALL changes for whole `entities`. Returns a Promise.
source (clj)source (cljs)raw docstring

subscribe-modelclj/s≠

(subscribe-model & {:keys [raw]})
clj

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.
cljs

Subscribe to model-deploy notifications. Returns a Promise.

Subscribe to model-deploy notifications. Returns a Promise.
source (clj)source (cljs)raw docstring

subscriptionsclj/s≠

(subscriptions)
clj

Return the server's view of this client's current subscriptions.

Return the server's view of this client's current subscriptions.
cljs

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.
source (clj)source (cljs)raw docstring

unsubscribeclj/s≠

(unsubscribe handle)
clj

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.
cljs

Remove a record subscription by handle. Returns a Promise.

Remove a record subscription by `handle`. Returns a Promise.
source (clj)source (cljs)raw docstring

unsubscribe-entityclj/s≠

(unsubscribe-entity entities)
clj

Remove entity-level subscriptions for entities.

Remove entity-level subscriptions for `entities`.
cljs

Remove entity-level subscriptions for entities. Returns a Promise.

Remove entity-level subscriptions for `entities`. Returns a Promise.
source (clj)source (cljs)raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close