Skip to content

Conversation

@Kauto
Copy link
Contributor

@Kauto Kauto commented Jan 12, 2026

On my server I found the issue

Nuwave\Lighthouse\Pagination\PaginationArgs::__construct(): Argument #1 ($page) must be of type int, null given, called in /var/www/app/vendor/nuwave/lighthouse/src/Pagination/PaginationArgs.php on line 55 {"exception":"[object] (TypeError(code: 0): Nuwave\\Lighthouse\\Pagination\\PaginationArgs::__construct(): Argument #1 ($page) must be of type int, null given, called in /var/www/app/vendor/nuwave/lighthouse/src/Pagination/PaginationArgs.php on line 55 at /var/www/app/vendor/nuwave/lighthouse/src/Pagination/PaginationArgs.php:18)
[stacktrace]
#0 /var/www/app/vendor/nuwave/lighthouse/src/Pagination/PaginationArgs.php(55): Nuwave\\Lighthouse\\Pagination\\PaginationArgs->__construct()
#1 /var/www/app/vendor/nuwave/lighthouse/src/Pagination/PaginateDirective.php(140): Nuwave\\Lighthouse\\Pagination\\PaginationArgs::extractArgs()

I wrote a test to reproduce the error and fixed it.

  • Added or updated tests
  • Documented user facing changes
  • Updated CHANGELOG.md

Changes

When explicit setting page to null in a pagination query, page is set to 1.

@Kauto Kauto force-pushed the fix/no_exception_for_page_eq_null branch from 4f33647 to 6447371 Compare January 12, 2026 18:01
@spawnia spawnia merged commit 5811da0 into nuwave:master Jan 13, 2026
62 checks passed
@spawnia
Copy link
Collaborator

spawnia commented Jan 13, 2026

Thank you, released with https://github.com/nuwave/lighthouse/releases/tag/v6.64.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants