This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-19
Channels
- # aleph (3)
- # beginners (90)
- # boot (1)
- # cider (1)
- # cljdoc (23)
- # clojars (1)
- # clojure (91)
- # clojure-dev (8)
- # clojure-greece (1)
- # clojure-italy (17)
- # clojure-japan (1)
- # clojure-nl (6)
- # clojure-spec (4)
- # clojure-uk (89)
- # clojurescript (48)
- # core-async (5)
- # cursive (79)
- # datascript (1)
- # datomic (40)
- # duct (1)
- # emacs (7)
- # figwheel-main (2)
- # graphql (7)
- # jobs (5)
- # nyc (5)
- # off-topic (61)
- # other-languages (2)
- # parinfer (6)
- # re-frame (63)
- # reagent (131)
- # ring-swagger (6)
- # shadow-cljs (158)
- # spacemacs (14)
- # tools-deps (15)
I’m looking for some guidance on how to integrate stillsuit with lacinia-pedestal. As I read it, it should Just Work™ by passing the decorated schema to lacinia/pedestal-service
. Is that right?
In theory, yes (that's how it's supposed to work). There is a sample repo which sadly I haven't had time to update in a while, but it's got an example of this: https://github.com/workframers/stillsuit-sample/blob/develop/src/stillsuit_sample/stillsuit.clj#L8
That said, we use ring instead of pedestal, so I've got simple stuff working but there might be more work to do to get a really solid implementation going
Oops, sorry, I guess I need to make it public. Meanwhile, the relevant snippet is
(defn service-map
[schema connection]
(let [opts {;:stillsuit/datomic-uri db-uri
:stillsuit/compile? true
:stillsuit/default? true
:stillsuit/trace? true
:stillsuit/scalars {}}
decorated (stillsuit/decorate opts)]
(lacinia/service-map (:stillsuit/schema decorated)
{:graphiql true
:app-context (:stillsuit/app-context decorated)})))