diff --git a/README.md b/README.md index 9e1329f..98885a2 100644 --- a/README.md +++ b/README.md @@ -401,7 +401,7 @@ $type->defaultSort('-updatedAt,-createdAt'); To define sort fields with custom logic, or ones that do not correspond to an attribute, use the `sort` method: ```php -$type->sort('relevance', function ($query, $direction, ServerRequestInterface $request) { +$type->sort('relevance', function ($query, string $direction, ServerRequestInterface $request) { $query->orderBy('relevance', $direction); }); ```