graphql enhancements#658
Merged
general-kroll-4-life merged 2 commits intoMay 28, 2026
mainstackql/stackql:mainfrom
feature/graphql-enhancementsstackql/stackql:feature/graphql-enhancementsCopy head branch name to clipboard
Merged
graphql enhancements#658general-kroll-4-life merged 2 commits intomainstackql/stackql:mainfrom feature/graphql-enhancementsstackql/stackql:feature/graphql-enhancementsCopy head branch name to clipboard
general-kroll-4-life merged 2 commits into
mainstackql/stackql:mainfrom
feature/graphql-enhancementsstackql/stackql:feature/graphql-enhancementsCopy head branch name to clipboard
Conversation
general-kroll-4-life
approved these changes
May 28, 2026
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.
Description
Consumes any-sdk
v0.5.3-alpha05and wires two of its three new GraphQL features through to stackql:response.transform— stackql now extracts the operation'sresponse.transform(type+body) and passes it to any-sdk's GraphQL reader, which applies the template to the raw response before the existingresponseSelection.jsonPathprojection. Lets specs flatten deep GraphQL responses into top-level columns withoutJSON_EXTRACTin SQL.cursor_after,keyset,offset,page_info) — stackql now builds agraphql.CursorConfigfrom the new accessors on thex-stackQL-graphQL.cursorextension (strategy,format,terminateOnJsonPath,pageSize) and hands it to any-sdk via the newNewStandardGQLReaderFullconstructor. Empty/absent fields default tocursor_after, so existing GraphQL providers are byte-identical to before.The single dispatch site in
graphql_single_select_acquire.goswaps fromNewStandardGQLReadertoNewStandardGQLReaderFull. The new field-extraction logic lives in two helpers (extractGraphQLResponseTransform,buildGraphQLCursorConfig) to keepBuild()under the cyclomatic-complexity threshold.The third any-sdk feature (
algorithm: page_numberREST pagination) is deliberately not wired in this PR — see Tech Debt below.What's in this PR
go.mod/go.sumany-sdkv0.5.3-alpha01→v0.5.3-alpha05internal/stackql/primitivebuilder/graphql_single_select_acquire.goresponse.transformand cursor strategy config through to the GraphQL readertest/registry/src/github/v0.3.1/services/scim.yamlsaml_ids_transformedresource exercisingresponse.transformagainst the existing/graphqlmock; addsaml_id/github_loginto the node schematest/robot/functional/stackql_mocked_from_cmd_line.robotGitHub SAML Identities Select GraphQL With Response TransformType of change
Issues referenced.
Evidence
go build ./...— clean.go test -timeout 120s --tags "sqlite_stackql" ./internal/stackql/... ./stackql/...— all packages pass (main suite ~30s).golangci-lint run ./...(v2.5.0, matches.github/workflows/lint.yml) — 0 issues.GitHub SAML Identities Select GraphQL With Response Transformreuses the existing SAML mock and asserts the same expected output as the existing test, but using the SQLselect guid, saml_id, github_login ... order by github_login asc— i.e. flat columns served by the transform rather than viaJSON_EXTRACT. ExistingGitHub SAML Identities Select GraphQLis untouched and proves back-compat of the defaultcursor_afterpath.Checklist:
Variations
GitHub SAML Identities Select GraphQLtest and reuses its expected-output fixture; CI is the source of truth here.response.transformonly. The three new cursor strategies (keyset/offset/page_info) are covered by any-sdk's own unit tests (TestRead_Keyset,TestRead_Offset,TestRead_PageInfoinpkg/graphql/graphql_test.go); the stackql change for those is pure config plumbing with no branching logic to exercise, and back-compat of the defaultcursor_afterpath is covered by the unchanged existing SAML test.Tech Debt
any-sdk
v0.5.3-alpha05also addsalgorithm: page_numberREST pagination (Cloudflare V4 / Atlassian / ServiceNow shape — termination by comparing current page to total pages rather than waiting for an empty next-page token). The internal logic exists in any-sdk and is consumed by theanysdkhttpinvoker, but the publicformulation.OperationStoreinterface does not re-exportGetPaginationAlgorithm()orGetPaginationResponseTerminatorTokenSemantic()— both of which stackql's local SELECT-pagination loop (internal/stackql/execution/mono_valent_execution.go::page()) needs in order to dispatch on the algorithm.Wiring
page_numberfrom stackql therefore requires a small follow-up any-sdk PR to lift those two getters through the public wrapper, a re-bump here, and a ~30-line dispatch + 3 robot tests in stackql.Tracking issue (to be filed in any-sdk): link TBA — covers adding
GetPaginationAlgorithmandGetPaginationResponseTerminatorTokenSemantictopublic/formulation/{interfaces,wrappers}.go.