Fork me on GitHub

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

👍 4

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


@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.


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


Somewhat related, I have been following the tutorial here 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?


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