Closed aimeos closed 1 year ago
Thanks, replaced the code with your suggestion.
@lindyhopchris Can you merge the PR now?
Sorry, thanks for the prompt! Yeah will merge and tag this weekend.
Apologies this took a while. Tagged as v3.0.1
. Thanks for your contribution!
For queries to a single resource (e.g.
v1/pages/1
) for which no relations should be fetched, there's an unnecessary query executed:This is because
$this->queryParameters->countable()
returnsNULL
here: https://github.com/laravel-json-api/eloquent/blob/develop/src/QueryOne.php#L125The patch checks for
NULL
values and avoids that query in this case.