Fine-grain GraphQL permissions that only allow getting single entry via ID or UID. #10091
-
I have a public GraphQL Schema and I want it to be possible to request a single entry if you know it's UID. I do not, however, want to allow anyone to query the db and receive a list of every single entry. More fine grain permissions that allow for this use-case would be incredible. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
We'll be getting around to tuning the GQL permission things, but that's unlikely to happen in 4.0 and will have to be 4.1 at least. Meanwhile, you can employ a dirty hack - use the |
Beta Was this translation helpful? Give feedback.
We'll be getting around to tuning the GQL permission things, but that's unlikely to happen in 4.0 and will have to be 4.1 at least.
Meanwhile, you can employ a dirty hack - use the
EVENT_REGISTER_GQL_QUERIES
event to take advantage of the fact that Craft registers its own queries first, go through the existing queries in the event handler, and just doctor the available arguments for theentries
andentry
queries.