hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.12k stars 2.77k forks source link

Support action custom checks #9485

Open lublak opened 1 year ago

lublak commented 1 year ago

Is your proposal related to a problem?

Currently, you can unfortunately only check at the row level. But it would be really practical to check in general if the query is justified.

Describe the solution you'd like

Add a Action permission custom check (not row based):

grafik grafik

Also with iregex

Describe alternatives you've considered

Currently I have no idea how to work around it. Only to add the text to each row. But with regex check it would be very slow.

ecthiender commented 1 year ago

@lublak just to clarify, you're proposing boolean expressions where on the LHS one can provide a static/hard-coded string/number value, instead of referring to a value from the row?

lublak commented 1 year ago

@ecthiender yes. A static value would be very handy. Also: The static value would never change per row. So a check before executing the SQL (request the data from the database) would be possible.