Fork me on GitHub
#graphql
<
2020-09-05
>
hadils16:09:24

Question -- can I implement a directive for access control in lacinia? Do I add resolvers for the directive? How does it work?

hlship18:09:16

Not a great solution for that yet; I’m going to add API so that a field resolver can see directives, but we have yet to come up with a way for directives to fit into the overall flow separate from resolvers. Generally, we’ve been doing auth in the Pedestal pipeline, and using the preview api to match a client’s api key against a set of operations (queries and mutations) that are allowed access to.

hadils19:09:36

Thanks @hlship -- where can I find the preview api?

hadils19:09:33

Nvm, I found it! Thanks @hlship