Typehint example
This commit is contained in:
parent
295d2beafd
commit
89742dff26
|
|
@ -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);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue