Typehint example

This commit is contained in:
Toby Zerner 2020-01-08 17:45:03 +10:30
parent 295d2beafd
commit 89742dff26
1 changed files with 1 additions and 1 deletions

View File

@ -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: To define sort fields with custom logic, or ones that do not correspond to an attribute, use the `sort` method:
```php ```php
$type->sort('relevance', function ($query, $direction, ServerRequestInterface $request) { $type->sort('relevance', function ($query, string $direction, ServerRequestInterface $request) {
$query->orderBy('relevance', $direction); $query->orderBy('relevance', $direction);
}); });
``` ```