refactor(mcp-server-consent): migrate GraphQL operations to typed codegen path - #340
Conversation
…egen path Author all 13 consent GraphQL operations with the generated graphql() tag in src/graphql.ts and consume the resulting TypedDocumentNodes via makeRequest, replacing the plain gql strings and hand-written response types imported from @transcend-io/sdk. Add consent to the codegen SERVERS list (and drop the stale "consent hits REST endpoints" comment) so operations are validated against the committed schema at compile time. Drop the now-unused @transcend-io/sdk dependency. No change to tool behavior.
@transcend-io/airgap.js-types
@transcend-io/cli
@transcend-io/design-tokens
@transcend-io/internationalization
@transcend-io/privacy-types
@transcend-io/sdk
@transcend-io/type-utils
@transcend-io/utils
@transcend-io/mcp
@transcend-io/mcp-server-admin
@transcend-io/mcp-server-assessment
@transcend-io/mcp-server-base
@transcend-io/mcp-server-consent
@transcend-io/mcp-server-discovery
@transcend-io/mcp-server-docs
@transcend-io/mcp-server-dsr
@transcend-io/mcp-server-inventory
@transcend-io/mcp-server-preferences
@transcend-io/mcp-server-workflows
commit: |
…okie-and-data-flow-triage' into danielsklyar/zel-8118-migrate-consent-mcp-graphql-operations-to-typed-codegen-path
…okie-and-data-flow-triage' into danielsklyar/zel-8118-migrate-consent-mcp-graphql-operations-to-typed-codegen-path
dawson-turechek-transcend
approved these changes
Jul 25, 2026
dawson-turechek-transcend
left a comment
Member
There was a problem hiding this comment.
Looks great!
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
Migrates the Consent Management MCP server onto the same typed GraphQL codegen path the other MCP servers use, so consent operations are validated against the committed
schema.graphqlat compile time (drift failstscinstead of surfacing as a runtime error). Closes ZEL-8118.graphql()tag in a newsrc/graphql.ts, and consume the resultingTypedDocumentNodes viamakeRequest— dropping the plaingqlstrings and hand-written response types imported from@transcend-io/sdk.consentto the codegenSERVERSlist incodegen.tsand remove the stale "consent hits REST endpoints, not GraphQL" comment.UpdateOrCreateCookieInput/UpdateDataFlowInputinput types.@transcend-io/sdkdependency; addgraphql+@graphql-typed-document-node/core(matching the other servers).No change to tool behavior — the operations, selection sets, and variables are preserved.
Test plan
pnpm codegengeneratesmcp-server-consent/src/__generated__/(all 13 ops validate against the schema)pnpm --dir packages/mcp/mcp-server-consent typecheckpnpm --dir packages/mcp/mcp-server-consent test(15 passing)pnpm --dir packages/mcp/mcp-server-consent buildoxlint/oxfmtcleanMade with Cursor