fix!: match the backend's standardized single-level pagination shape#7
Merged
Merged
Conversation
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).
5 tasks
Picks up the backend's pagination schema fix this PR targets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Authorizer backend removed the
PaginatedRequestwrapper type entirely (see the correspondingauthorizerdev/authorizerPR — afix(graphql)!breaking-change commit standardizing GraphQL pagination onPaginationRequestdirectly, matching the proto/gRPC surface, which never had a double-wrapper in the first place).ListClientsRequest/ListTrustedIssuersRequest/ListSAMLServiceProvidersRequest/ListOrganizationsRequest/ListOrgMembersRequest/ListOrgDomainsRequest: theirpaginationfield was typedPaginatedRequest(itself wrappingPaginationRequest) — nowPaginationRequestdirectly. Breaking change for callers constructing these with a nestedpagination=.verification_requests/webhooks/email_templates(bothAuthorizerAdminClientandAsyncAuthorizerAdminClient): tookPaginatedRequestas their whole request parameter and hardcoded$data: PaginatedRequestin the GraphQL query strings — now takePaginationRequestdirectly,$data: PaginationRequest._proto.py'sbuild_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.PaginatedRequestis no longer exported from the package.Also fixed 5 pre-existing bugs in
tests/integration/test_live.pyuncovered while making this change: twotest_admin_users/test_async_admin_userscalls were passingt.PaginatedRequest(...)whereadmin.users()/c.users()actually expectt.ListUsersRequest— a type mismatch unrelated to this fix that happened to go unnoticed untilPaginatedRequestwas removed and the test file could no longer even construct it.Test plan
mypy src/andruff check src/ tests/cleanpytest tests/ --ignore=tests/integration— 112 unit tests passauthorizerimage 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.