Skip to content

Commit 89742df

Browse files
committed
Typehint example
1 parent 295d2be commit 89742df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ $type->defaultSort('-updatedAt,-createdAt');
401401
To define sort fields with custom logic, or ones that do not correspond to an attribute, use the `sort` method:
402402

403403
```php
404-
$type->sort('relevance', function ($query, $direction, ServerRequestInterface $request) {
404+
$type->sort('relevance', function ($query, string $direction, ServerRequestInterface $request) {
405405
$query->orderBy('relevance', $direction);
406406
});
407407
```

0 commit comments

Comments
 (0)