Skip to content

Commit a8aa501

Browse files
committed
Fix types for Paginator
1 parent c882fd4 commit a8aa501

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Mappers/PaginatorTypeMapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ private function getObjectType(bool $countable, OutputType $subType): MutableInt
161161

162162
if ($countable) {
163163
$fields['totalCount'] = [
164-
'type' => Type::int(),
164+
'type' => Type::nonNull(Type::int()),
165165
'description' => 'The total count of items.',
166166
'resolve' => static function (LengthAwarePaginator $root): int {
167167
return $root->total();
168168
}];
169169
$fields['lastPage'] = [
170-
'type' => Type::int(),
170+
'type' => Type::nonNull(Type::int()),
171171
'description' => 'Get the page number of the last available page.',
172172
'resolve' => static function (LengthAwarePaginator $root): int {
173173
return $root->lastPage();

0 commit comments

Comments
 (0)