Fork me on GitHub
#graphql
<
2018-05-21
>
madstap19:05:11

Are there any docs/blog posts/resources for how to do authentication/authorization with lacinia?

👍 4
hlship20:05:52

I'll eventually work up to that in the tutorial. It's really more Pedestal-based than Lacinia-based.

gklijs19:05:40

@madstap An option is to use a pedestal interceptor and use that from the context when needed I believe. Haven't tried it myself yet.

madstap19:05:12

So something like passing in a token via interceptor and in every resolver read that out of the context map?

madstap19:05:55

Somewhat related, I have been following the tutorial here http://lacinia.readthedocs.io/en/latest/tutorial/index.html In it every resolver function calls out to the database when called. since I'm using datomic it would be nice if every part of a query had a stable view of the database. Would it be reasonable to pass a datomic database value in the context as well? Or passing just the t value would be better?

hlship20:05:16

I believe I would capture the datomic database value and put that into the context, possibly as part of the Pedestal interceptor chain, before entry into Lacinia.

👍 8