Lighthouse: Support Laravel Octane

Created on 21 Apr 2021  路  4Comments  路  Source: nuwave/lighthouse

What problem does this feature proposal attempt to solve?

Laravel Octane promises great performance, but poses some restrictions on dependency injection and usage of global state: https://laravel.com/docs/octane#dependency-injection-and-octane

Which possible solutions should be considered?

Check for problematic dependency injection patterns within Lighthouse and fix them.

enhancement performance

Most helpful comment

We could use larastan to do a big chunk of the work here and have static analysis checking for this.
https://github.com/nunomaduro/larastan/blob/master/docs/rules.md#octanecompatibilityrule

All 4 comments

We could use larastan to do a big chunk of the work here and have static analysis checking for this.
https://github.com/nunomaduro/larastan/blob/master/docs/rules.md#octanecompatibilityrule

Thanks @olivernybroe for the tip, I used that plus some manual auditing. There were a few fixes to be made, released as of https://github.com/nuwave/lighthouse/releases/tag/v5.10.0

I am looking to try this out myself soon and am happy for feedback from others. Memory leaks are a particular concern I still have, there is some global state in Lighthouse which I am not too sure about. The Defer module seems particularly suspicious.

Wauw, that was a lot more changes then I thought we would need 馃槷

Great job! Hopefully I will have time to test it out soon also.

https://github.com/nuwave/lighthouse/pull/1854 only had 3 substantial changes actually, the rest was cleanup 馃槈

Was this page helpful?
0 / 5 - 0 ratings

Related issues

souljacker picture souljacker  路  3Comments

wimski picture wimski  路  3Comments

vine1993 picture vine1993  路  3Comments

nguyentrongbang picture nguyentrongbang  路  3Comments

m1guelpf picture m1guelpf  路  3Comments