lighthouse
lighthouse copied to clipboard
Eager load multiple nested relations using @with
Resolves https://github.com/nuwave/lighthouse/issues/1132, probably also https://github.com/nuwave/lighthouse/issues/1873
- [x] Added or updated tests
- [x] Documented user facing changes
- [ ] Updated CHANGELOG.md
Changes
Breaking changes
In this exactly old version 5.70.3, the nested relationship eager loading works .
But not on latest state version 6.x.
type Bar {
city: City @method(name: "handleCity") @with(relation: "city.state")
}
By the way , I have tested this PR and works fine, solve the problem. If you need some help to merge it let me know.
By the way , I have tested this PR and works fine, solve the problem. If you need some help to merge it let me know.
The changes I made fix eager loading of multiple @with, but break other scenarios - see https://github.com/nuwave/lighthouse/actions/runs/9380728096/job/25828392738. Thus, it can not be merged as is, the final solution will have to look different.