hasura / hasura/graphql-engine

[v2.0.0-alpha.10] Relationship field query not respecting permissions

Open
#6,930 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

I've recently upgraded from v1.3.3 to v2.0.0-alpha.10 and I'm facing some issues that didn't exist before, so I've setup a test instance on Heroku to isolate them. I can share the instance if needed, but it's easily reproducible.

I created a `list_item` table with a field `user_id` referencing `user` (`id`, `name`), with the proper foreign keys and relationships. On the permissions tab for `list_item` I have **not** allowed `user_id`. I've populated it with some test data.

However, this query works:
```gql
{
list_item {
#user_id
user {
id
name
}
}
}
```

If i uncomment `user_id` I get the proper error that it doesn't exist.

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.