laravel-graphql
laravel-graphql copied to clipboard
Add $context and $info to authorize method
I have added these 2 missing arguments in order to access the $info in the authorize method.
Are there any issues with this PR? I'd like this added so I don't have to retrieve the extra arguments using func_get_args()
I'd like this added so I don't have to retrieve the extra arguments using func_get_args()
IMHO technically it's not necessary. Did you try just added the arguments to authorize
? You should still receive them. It's just the parent does not include them in the signature.
I thought that originally as well and tested using it that way. However, with PHP7.2 at least, it resulted in a compile error because the signature no longer matched the parent and it threw an exception. So I am not able to do that until the parent signature is updated to what it should be.
Thanks for the suggestion though
Uh, thanks for the heads up, wasn't aware of this 👍