This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-15
Channels
- # announcements (1)
- # babashka (81)
- # beginners (48)
- # calva (49)
- # clj-kondo (52)
- # cljdoc (7)
- # cljs-dev (39)
- # clojure (33)
- # clojure-australia (18)
- # clojure-europe (48)
- # clojure-italy (2)
- # clojure-morsels (2)
- # clojure-nl (3)
- # clojure-uk (6)
- # clojurescript (5)
- # community-development (2)
- # conjure (6)
- # cursive (3)
- # data-science (29)
- # datalog (4)
- # datomic (14)
- # events (1)
- # fulcro (1)
- # graphql (18)
- # gratitude (2)
- # helix (11)
- # introduce-yourself (2)
- # java (15)
- # keyboards (2)
- # lsp (6)
- # luminus (4)
- # membrane (32)
- # minecraft (1)
- # missionary (7)
- # nextjournal (2)
- # off-topic (28)
- # portal (28)
- # releases (1)
- # ring (1)
- # shadow-cljs (3)
- # sql (6)
- # xtdb (23)
is there any way to disable extensions
from json response?
{
"data": {
"acessoSistema": {
"codigo": 1,
"mensagem": "",
"token": "AHAHAHAHHAHAHAHAHAHHA"
}
},
"extensions": {
"tracing": { ...
https://lacinia.readthedocs.io/en/latest/tracing.html the docs mention removing an interceptor from the pipeline
what's the easiest way to generate an SDL file for an existing GraphQL endpoint, from Clojure or Java?
You can run an introspection query, although it doesn't include directives other than @deprecated
iirc.
There’s been repeated talk of Lacinia code that could generate SDL directly from the compiled schema; I started that, but ran out of time; others have mentioned taking a crack at it. It’s not hard, though if you want pretty output, it’s a little bit more involved.
Lets say that I have a streamer that produces subsequent ints:
(defn my-int-streamer [ctx args source-stream]
(doall (for [i (range 5)] (source-stream i)))
(fn []))
Should I be able to rely on the websocket messages being in the same order as the invocations of source-stream
? Like this:
{:type "data" :payload {:data 0}}
{:type "data" :payload {:data 1}}
{:type "data" :payload {:data 2}}
{:type "data" :payload {:data 3}}
{:type "data" :payload {:data 4}}
If thats the intention, I think lacinia-pedestal has a race condition: nested selections are resolved on async/thread’s, but the subscription go-loop does not park itself while this thread is running. Therefore, subsequent source-stream calls from a resolver may reorder on the websocket depending on the execution time of their nested selection.I think the solution is relatively easy, the subscription go loop should probably park itself (with async/<!
) until the completion of the resolving of the nested selection here: https://github.com/walmartlabs/lacinia-pedestal/blob/master/src/com/walmartlabs/lacinia/pedestal/subscriptions.clj#L360-L369
Totally willing to contribute this, if we deem this a bug 🙂
we've done something similar in our codebases, but we return a promise that's only delivered when the execution has finished so that the caller can block on it
If that’s inside the go loop, isn’t that a blocking call you want to avoid?
Oh ah you make the streamer block?
Also prevents a backlog building up where the streamer is invoked faster than the query can be resolved
The reality is that our main web service is now behind an Apollo Federated gateway which disallows subscriptions. We end up with a lot of clients treating us like a REST service (need to query everything to make my TypeScript classes happy). So we are not eating our own dogfood, subscriptions-wise.
On the other hand, all those alphas? Those are to go up into our production, and we use everything else in Lacinia in one way or another.
Hehe, yeah, I kinda assumed already you guys weren’t using it much in prod. I’ll see if I can take a crack at that PR soon, I’ll incorporate both my solution and oliy’s so we can discuss on GH.