Open
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | maybe |
BC Break report? | no |
RFC? | no |
Version/Branch | x.y.z |
I am trying to define field access control on my types, but I need to use the whole object for this decision, not only the value of protected field (which is accessible in expression by object
).
Example:
Advert:
type: object
config:
fields:
id:
type: Int
userId:
type: Int
description:
type: String
access: "@= ???"
In my example I want to allow access to description
property only for owner (based on userId
) of the Advert
object and to forbid it for all others. All other properties should remain accessible for all users.
Is this possible using Expression language with available variables? Or I have to create custom resolvers, where I can check against this condition, for all my fields?