This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-26
Channels
- # announcements (6)
- # beginners (88)
- # calva (12)
- # cider (13)
- # cljs-dev (27)
- # cljsrn (2)
- # clojure (68)
- # clojure-argentina (2)
- # clojure-dev (10)
- # clojure-europe (1)
- # clojure-greece (1)
- # clojure-italy (5)
- # clojure-nl (15)
- # clojure-spec (33)
- # clojure-switzerland (1)
- # clojure-uk (10)
- # clojurescript (121)
- # clojutre (3)
- # code-reviews (2)
- # core-async (1)
- # cursive (10)
- # data-science (1)
- # datomic (21)
- # emacs (10)
- # events (1)
- # fulcro (25)
- # graphql (6)
- # joker (4)
- # kaocha (12)
- # lambdaisland (3)
- # music (2)
- # off-topic (112)
- # om (2)
- # re-frame (25)
- # reagent (29)
- # reitit (93)
- # rewrite-clj (2)
- # shadow-cljs (18)
- # slack-help (4)
- # spacemacs (8)
- # tools-deps (1)
- # vim (2)
- # yada (5)
The Fullstack Tutorial for GraphQL, https://www.howtographql.com/, ported from Javascript to Clojure/script: Blog post: https://promesante.github.io/2019/08/14/clojure_graphql_fullstack_learning_project_part_1.html Source code GitHub repo: https://github.com/promesante/hn-clj-pedestal-re-frame Suggestions and corrections, more than welcome. Hope it to be useful for anyone interested.
Q: I want to use lacinia-pedestal to use a non-blocking micro-service call in a resolver. I’ve looked at the tests for async but I’m wondering if there’s any other samples out there of implementing resolvers this way?
Do you need this: https://lacinia.readthedocs.io/en/latest/resolve/async.html ?
@UDF11HLKC yes that is close however I believe the resolvers in a lacinia-pedestal environment might be slightly different from vanilla Lacinia. The reason I suspect this is that Pedestal runs async when an interceptor returns a core.async channel so I’m not clear on the right way to implement. I’ll keep digging but thanks for your response.
Lacinia-pedestal can run in two modes; there's an option for that. In mode 1, it blocks while query executes; individual resolvers may be sync or async. This will result in a Jetty request thread being blocked. In mode 2, it returns a channel while the query executes async. Resolvers may be async or not.