This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-06
Channels
- # announcements (33)
- # babashka (13)
- # babashka-sci-dev (23)
- # beginners (94)
- # calva (105)
- # cider (37)
- # circleci (1)
- # clj-kondo (45)
- # cljs-dev (59)
- # cljsrn (2)
- # clojure (145)
- # clojure-czech (1)
- # clojure-europe (19)
- # clojure-nl (18)
- # clojure-norway (13)
- # clojure-portugal (1)
- # clojure-uk (5)
- # clojurescript (19)
- # community-development (2)
- # conjure (3)
- # copenhagen-clojurians (1)
- # core-async (34)
- # data-science (6)
- # datomic (25)
- # emacs (43)
- # fulcro (19)
- # graalvm (7)
- # graalvm-mobile (12)
- # graphql (10)
- # honeysql (3)
- # hyperfiddle (3)
- # improve-getting-started (2)
- # interop (20)
- # kaocha (3)
- # lsp (16)
- # meander (7)
- # off-topic (22)
- # other-languages (14)
- # portal (15)
- # releases (1)
- # rewrite-clj (2)
- # ring (1)
- # shadow-cljs (119)
- # spacemacs (19)
- # sql (65)
- # testing (4)
- # tools-deps (11)
- # xtdb (29)
I’m still working on the batching query execution engine, but there is already a repo: https://github.com/vlaaad/plusinia You can have a look at tests for some examples. It works! Batches by field+args, supports interfaces and unions…
Hey!
I have an issue with re-graph subscriptions. After subscribing, I actually get the first message via websocket, but then no more events.
It seems, that the value :subscriptions
of app-db
is just an empty map (see screenshot), and does not contain the subscription, as I think it should be (concluding from https://github.com/oliyh/re-graph/issues/42).
(re-frame/reg-event-db
::on-thing
[(when ^boolean goog.DEBUG re-frame/debug)]
(fn [db [_ {:keys [data errors] :as payload}]]
(js/console.log "message:" payload)
(js/console.log "db:" (clj->js db))
db))
(re-frame/dispatch-sync
[::re-graph/init
{:ws {:url (str ")
:sub-protocol "graphql-ws"
:reconnect-timeout 500
:resume-subscriptions? true
:connection-init-payload {:token account
:csrf csrf}
:impl {:headers {"Authorization" (str "Bearer " account)
"Authorization-CSRF" csrf}}
:supported-operations #{:subscribe
:query
:mutate}}
:http {:url ""
:impl {:headers {"Authorization" (str "Bearer " account)
"Authorization-CSRF" csrf}}
:supported-operations #{:query
:mutate}}}])
(re-frame/dispatch-sync [::re-graph/subscribe
:my-subscription-id
MESSAGES_SUBSCRIPTION
{:targetIds ["ZKFETo4fAfHMuCAfXrud1AKhq5MMm4akpqcb5T8qjgxSFaShyUZYCEH65755"]}
[::on-thing]])
:ready?
is true
, as it is supposed to be, I think.
My guess at the moment is your subscription is finishing and sending a stop message down the websocket, which results in the subscription being cleaned up
Not sure it's of any help, but this is an example of subscriptions working, https://github.com/gklijs/bkes-demo.
Thank you for your hints! It really was the case, that the stream sent a {type: "complete"}
message and subscription subsequently ended.