Description
When batchload_relations enabled in config file, and @canResolved is used for a relation the action: RETURN_VALUE will be ignored.
Expected behavior/Solution
When model's policy returns false and action = RETURN_VALUE, is set to null expectation is that it will return null instead of the This action is unauthorised
Steps to reproduce
GraphQL:
type User {
book: Book @belongsTo @canResolved(ability: "view", action: RETURN_VALUE, returnValue: null)
}
type Query {
users(): [User] @canResolved(ability: "view") @paginate
}
Lighthouse Version
v6.65.0