- Notifications
You must be signed in to change notification settings - Fork 221
Closed
Labels
Description
| Q | A |
|---|---|
| Bug report? | yes |
| Feature request? | no |
| BC Break report? | no |
| RFC? | no |
| Version/Branch | xxx |
Hey, I encountered a problem on field access control.
So I got this schema:
Query: type: object config: fields: site: type: Site resolve: "@=resolver('site', [args])" access: "@=hasPermission(object, 'view')" args: id: type: "Int" Site: type: object config: fields: alpGroups: type: "[AlpGroup]!" resolve: "@=resolver('alp_groups_for_site', [value])" AlpGroup: type: object config: fields: id: type: Int! platform: type: Site! access: "@=hasPermission(object, 'view')"The user has access to site and site.alpGroups, but he does not have access to site.alpGroups.X.platform.
Here is a small example of what the query can returns:

However, when I try to access site.alpGroups.X.platform, every values of data.site.alpGroups are null.

Why does it not return something like below?
Did I misunderstand how field access works, or it's a bug?
{ "data": { "site": { "alpGroups": [ { "id": 1, "platform": null }, { "id": 2, "platform": null }, { "id": 3, "platform": null }, { "id": 4, "platform": null } ] } } } Thanks!