Include default eager loads
If you're using the hasMany
directive and you're connected model has default eager loading Lighthouse will now pull in those relations automatically.
For example, if you have a model:
class Post extends Model
{
protected $with = ['comments'];
}
a schema like this:
type Post {
author: [Comment!]! @hasMany
}
Lighthouse will automatically eager load the author
relationship whenever a Post
type is queried.