Skip to content

fix!: match the backend's standardized single-level pagination shape#7

Merged
lakhansamani merged 2 commits into
mainfrom
fix/pagination-schema-standardization
Jul 23, 2026
Merged

fix!: match the backend's standardized single-level pagination shape#7
lakhansamani merged 2 commits into
mainfrom
fix/pagination-schema-standardization

Conversation

@lakhansamani

Copy link
Copy Markdown
Contributor

Summary

The Authorizer backend removed the PaginatedRequest wrapper type entirely (see the corresponding authorizerdev/authorizer PR — a fix(graphql)! breaking-change commit standardizing GraphQL pagination on PaginationRequest directly, matching the proto/gRPC surface, which never had a double-wrapper in the first place).

  • ListClientsRequest/ListTrustedIssuersRequest/ListSAMLServiceProvidersRequest/ListOrganizationsRequest/ListOrgMembersRequest/ListOrgDomainsRequest: their pagination field was typed PaginatedRequest (itself wrapping PaginationRequest) — now PaginationRequest directly. Breaking change for callers constructing these with a nested pagination=.
  • verification_requests/webhooks/email_templates (both AuthorizerAdminClient and AsyncAuthorizerAdminClient): took PaginatedRequest as their whole request parameter and hardcoded $data: PaginatedRequest in the GraphQL query strings — now take PaginationRequest directly, $data: PaginationRequest.
  • _proto.py's build_message(): removed a dead-code-now branch that specifically detected and collapsed the double-nested {"pagination": {"pagination": {...}}} shape for REST/gRPC callers — unreachable once no caller can produce that shape anymore.
  • PaginatedRequest is no longer exported from the package.

Also fixed 5 pre-existing bugs in tests/integration/test_live.py uncovered while making this change: two test_admin_users/test_async_admin_users calls were passing t.PaginatedRequest(...) where admin.users()/c.users() actually expect t.ListUsersRequest — a type mismatch unrelated to this fix that happened to go unnoticed until PaginatedRequest was removed and the test file could no longer even construct it.

Test plan

  • mypy src/ and ruff check src/ tests/ clean
  • pytest tests/ --ignore=tests/integration — 112 unit tests pass
  • Verified against a locally built authorizer image running the backend fix (not yet released): all 63 live integration tests pass across all three transports (graphql, rest, grpc), including the pagination-related suite (test_admin_users, test_admin_verification_requests, test_admin_webhook_lifecycle, test_async_admin_users)

Please coordinate merging/releasing this alongside the backend fix — until the backend PR ships, this SDK version would send a shape the currently-deployed backend rejects.

BREAKING CHANGE: the Authorizer backend removed the PaginatedRequest
wrapper type entirely, standardizing GraphQL pagination on
PaginationRequest directly everywhere - matching the proto/gRPC surface,
which never had a double-wrapper in the first place.

- ListClientsRequest/ListTrustedIssuersRequest/ListSAMLServiceProvidersRequest/
  ListOrganizationsRequest/ListOrgMembersRequest/ListOrgDomainsRequest:
  their `pagination` field was typed PaginatedRequest (itself wrapping
  PaginationRequest) - now PaginationRequest directly. Breaking change
  for callers constructing these with a nested `pagination=`.
- verification_requests/webhooks/email_templates (both AuthorizerAdminClient
  and AsyncAuthorizerAdminClient): took PaginatedRequest as their whole
  request parameter and hardcoded `$data: PaginatedRequest` in the
  GraphQL query strings - now take PaginationRequest directly,
  `$data: PaginationRequest`.
- _proto.py's build_message(): removed a dead-code-now branch that
  specifically detected and collapsed the double-nested
  {"pagination": {"pagination": {...}}} shape for REST/gRPC callers -
  unreachable once no caller can produce that shape anymore.
- PaginatedRequest is no longer exported from the package.

Verified against a locally built authorizer image running the backend
fix: mypy and ruff check clean, all 112 unit tests pass, all 63 live
integration tests pass across all three transports (graphql, rest, grpc).
Picks up the backend's pagination schema fix this PR targets.
@lakhansamani
lakhansamani merged commit d317083 into main Jul 23, 2026
11 of 12 checks passed
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.

1 participant