Hey guys :wave: I just released the new version of...
# madewithprisma
m
Hey guys 👋 I just released the new version of GraphQL Shield which helps you manage permissions in your GraphQL Server more efficiently. The new version has been focused on managing cache and the overall speed improvements. Check out the article below where we create an online groceries store with real fruits and vegetables! 🍏🛡️🍓 https://medium.com/@maticzavadlal/graphql-shield-9d1e02520e35
💯 8
👊🏼 1
d
I wonder.. why not use directives?
Coming of from a person that's recently researching possible ways to do permissions & authorization btw, just curious really
m
Ah yes @Dukuo, thanks for bringing up this question. Well, for many reasons. I would say that the most obvious one be caching. Directives, as far as I know, don’t support such sophisticated caching as Shield does. Furthermore, some prefer to keep the schema “clean". What I mean with this is that you keep the schema solely explaining the model, not the logic as well. If you have some time, I would love to hear what directives on the other hand offer. I haven’t done much research in that way because I don’t really like mixing the two of them together but I am open to new ideas.
d
hey @matic thanks for the reply. Why would you need caching in authorization ? For example, would cache be invalidated if the permissions are changed?
m
@Dukuo permissions are cached in each query request separately. I talk a bit more about this in the article above. Check it out, it would be great to get some feedback from your point of view! 🙂
d
will do, thanks @matic!