fix!: match the backend's standardized single-level pagination shape#22
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.
This SDK had two places affected, both GraphQL-transport-only (REST and
gRPC use the proto message shapes directly and were never affected):
- VerificationRequests/Webhooks/EmailTemplates: hardcoded
`$data: PaginatedRequest` in their query strings and passed the whole
proto request (itself just a Pagination wrapper) as the variable - now
`$data: PaginationRequest`, passing req.GetPagination() directly.
- Clients/TrustedIssuers/ListSamlServiceProviders: used a wrapPagination
helper to double-nest the proto PaginationRequest into
`{pagination: {pagination: {...}}}` for the GraphQL variables - the
helper is removed, the proto pagination now passes through as-is.
- ListOrganizationsRequest/ListOrgMembersRequest/ListOrgDomainsRequest
(this SDK's own Go-native request types, not proto-generated): their
Pagination field was typed *PaginatedRequest, requiring callers to
double-nest by hand - now *PaginationRequest directly. Breaking change
for any caller constructing these types with a nested Pagination.
Verified against a locally built authorizer image running the backend
fix: go build/vet/gofmt clean, full `go test ./...` passes across all
three transports (graphql, rest, grpc), including the admin pagination
suite (TestAdminUsersAcrossProtocols, TestAdminWebhookLifecycle,
TestAdminFgaModelAndTuples) and the full protocol/auth suite.
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).Two places in this SDK were affected — both GraphQL-transport-only (REST and gRPC use the proto message shapes directly and were never affected by the old GraphQL-schema-only wrapper):
VerificationRequests/Webhooks/EmailTemplates: hardcoded$data: PaginatedRequestin their query strings and passed the whole proto request (itself just aPaginationwrapper) as the GraphQL variable — now$data: PaginationRequest, passingreq.GetPagination()directly.Clients/TrustedIssuers/ListSamlServiceProviders: used awrapPaginationhelper to double-nest the protoPaginationRequestinto{pagination: {pagination: {...}}}for the GraphQL variables — the helper is removed, the proto pagination now passes through as-is.ListOrganizationsRequest/ListOrgMembersRequest/ListOrgDomainsRequest(this SDK's own Go-native request types, not proto-generated): theirPaginationfield was typed*PaginatedRequest, requiring callers to double-nest by hand — now*PaginationRequestdirectly. Breaking change for any caller constructing these types with a nestedPagination.Test plan
go build ./.../go vet ./.../gofmt -l .cleanauthorizerimage running the backend fix (not yet released): fullgo test ./...passes across all three transports (graphql, rest, grpc) — including the admin pagination suite (TestAdminUsersAcrossProtocols,TestAdminWebhookLifecycle,TestAdminFgaModelAndTuples) and the full protocol/auth suitePlease 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.