Fork me on GitHub
#graphql
<
2018-07-19
>
curtosis18:07:40

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?

timgilbert14:07:05

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

timgilbert14:07:36

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

curtosis15:07:18

I get a 404 on that repo, unfortunately.

timgilbert15:07:06

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)})))

curtosis15:07:45

thanks! Giving that a go…

curtosis15:07:03

I’m also complicating things by using a hacked version of umlaut, but that shouldn’t be a huge issue yet.