Skip to content

AuthZ and subscriptions #738

Answered by hayes
thuperthecret2 asked this question in Q&A
Jan 6, 2023 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

This is likely an authz issue. I've been thinking about removing this plugin from the docs. My experience with it has been poor, and when I looked into it's implementation I found several instances of object rules not being applied correctly.

The Pothos plugin is extremely simple: https://github.com/hayes/pothos/blob/main/packages/plugin-authz/src/index.ts, it really just adds the rules to the extensions object for types/fields. Most of it is just about creating nice types, and all the actual logic is implemented by authz.

I would strongly recommend the scope auth plugin instead. There is also an example of how to use graphql shield in the examples folder on GitHub if you prefer that.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@thuperthecret2
Comment options

@hayes
Comment options

@thuperthecret2
Comment options

@thuperthecret2
Comment options

@hayes
Comment options

Answer selected by thuperthecret2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants