nuwave / lighthouse

A framework for serving GraphQL from Laravel
https://lighthouse-php.com
MIT License
3.36k stars 438 forks source link

Remove Request from the ThrottleDirective constructor #2511

Closed k0ka closed 7 months ago

k0ka commented 7 months ago

Changes

The PR fixes a case of "persistent" directive usage, when it is ran several times for different requests. This might happen in test or Laravel Octane environments. We can't get Request in the constructor in these cases. But must get it inside resolver from GraphQLContext

spawnia commented 7 months ago

Thanks!