hasura / hasura/graphql-engine

Restricting relationship fields in query

Open
#9,526 0 comments 0 reactions 0 assignees View on GitHub
k/enhancement t/native-dbs
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem? Yes

When we are exposing APIs to our customers.
We need to restrict some of the relationship queries.
Eg:
- There are 2 tables, users & orders
- When we query the API we don't want them to query the orders as a user field
- But when on the orders query they can pass the user id in the where clause

### Describe the solution you'd like

- Ability to add permissions in relationships as we do in columns leven
- Ability to restrict what arguments we need to expose

### Describe alternatives you've considered

- Restricting order table - this will prevent users from accessing the table itself
- Creating an API with schema stitching where I filter the unwanted fields

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.