hasura / hasura/graphql-engine
Make column operators work with relations in permissions
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
Yes, for the complex permissions system that my company is building, we often need to scope down our permissions based on columns that exist in tables related to the table we're writing permissions for. But unfortunately it seems we can only use the `_ceq` operator with fields that exist directly on the table, not on its relations.
### Describe the solution you'd like
Allow `_ceq` and similar column operators in permissions to reference columns in other related tables.
### Describe alternatives you've considered
Making views that include the data, disabling the original tables query roots, and then defining permissions on these views. But that's a confusing pattern.
Contributor guide
Research direction
No files, entry points, or tests are named. Start by locating the permission handling for `_ceq` and related column operators, then trace how related-table fields are represented. Done means permissions can reference columns on related tables with `_ceq` and similar operators, with coverage for the supported relation cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql
- Domain
- api, authorization, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100