Currently, has_permission
is called with **kwargs
containing any arguments to the resolver being permission checked, which if you have a resolver argument called source
or info
will lead to an error such as has_permission() got multiple values for argument 'source'
.
Unfortunately, a schema I am converting does have a source
argument to one of the resolvers.
As a work around, I am taking advantage of the positional argument parsing and have changed my permissions signatures to has_permission(self, _source, info, **kwargs)
to avoid the problem for now. Perhaps a better long term solution would be that resolver args are not spread on the has_permission
call, but left in a dict, e.g. has_permission(self, source, info, resolver_args=kwargs)
?
The currently reserved names do not appear to be documented from what I could find.
main
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too