lighthouse
lighthouse copied to clipboard
Refactor builder types
In laravel 9, a new interface Illuminate\Contracts\Database\Query\Builder was added to improve the readability of typehints like Illuminate\Database\Query\Builder|Illuminate\Database\Eloquent\Builder|Illuminate\Database\Eloquent\Relations\Relation.
This pr is just some refactoring to use that interface and I also found some duplicate code which i moved to a trait.
- [x] Added or updated tests
- [x] Documented user facing changes
- [x] Updated CHANGELOG.md
(Breaking) Changes
When building custom directives, people now need to use the new Builder interface to typehint. So this would be something for a v7.
I did some regex replacements for the @param docblocks and resolved other review issues.
@thekonz I included the parts that clean up existing code in https://github.com/nuwave/lighthouse/pull/2390.
I cleaned up a couple of remaining places where the interface could be used and added another change on top. It is somewhat unrelated but touches the same parts of the code and is also breaking, so I figured we might as well save ourselves the trouble of resolving merge conflicts and add it in one go.
i think this pr is fine, i don't understand why my change would make codecov care all of a sudden. what's your merge strategy? merge v7 changes to master or a separate v7 branch?
i don't understand why my change would make codecov care all of a sudden.
No worries, we can just ignore that.
what's your merge strategy? merge v7 changes to master or a separate v7 branch?
Merge to master once we decided to make the cut towards v7.