hasura / hasura/graphql-engine

Create a better error message when a role has no permission

Open
#8,430 0 comments 2 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?
Yes, when a role has no permission to do select/update etc., the message returned is very misleading:
field "pesquisa" not found in type: 'query_root'
It make us think that or the table was no created, or a field on the table was not created, or some other bizarre error.

### Describe the solution you'd like
A simple error message like "ROLE user has nos permission to SELECT on table PESQUISA"

### Describe alternatives you've considered

### If the feature is approved, would you be willing to submit a PR?

Contributor guide

Open the contributing guide

Research direction

The issue does not name a file, test, or entry point. Start by tracing how denied SELECT or UPDATE permissions on a table become the GraphQL error, then identify the role and table context available at that point. Done means permission failures report the role, operation, and table clearly instead of a misleading missing-field error.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, postgres, typescript
Domain
api, authorization, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.