Skip to content

refactor(mcp-server-consent): migrate GraphQL operations to typed codegen path - #340

Open
dsklyar wants to merge 3 commits into
danielsklyar/zel-8105-scope-consent_analyze-gaps-for-cookie-and-data-flow-triagefrom
danielsklyar/zel-8118-migrate-consent-mcp-graphql-operations-to-typed-codegen-path
Open

refactor(mcp-server-consent): migrate GraphQL operations to typed codegen path#340
dsklyar wants to merge 3 commits into
danielsklyar/zel-8105-scope-consent_analyze-gaps-for-cookie-and-data-flow-triagefrom
danielsklyar/zel-8118-migrate-consent-mcp-graphql-operations-to-typed-codegen-path

Conversation

@dsklyar

@dsklyar dsklyar commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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.graphql at compile time (drift fails tsc instead of surfacing as a runtime error). Closes ZEL-8118.

  • Author all 13 consent operations with the generated graphql() tag in a new src/graphql.ts, and consume the resulting TypedDocumentNodes via makeRequest — dropping the plain gql strings and hand-written response types imported from @transcend-io/sdk.
  • Add consent to the codegen SERVERS list in codegen.ts and remove the stale "consent hits REST endpoints, not GraphQL" comment.
  • Type mutation variables with the generated UpdateOrCreateCookieInput / UpdateDataFlowInput input types.
  • Drop the now-unused @transcend-io/sdk dependency; add graphql + @graphql-typed-document-node/core (matching the other servers).

No change to tool behavior — the operations, selection sets, and variables are preserved.

Note: stacked on top of #338 (ZEL-8105). Base is the ZEL-8105 branch; retarget to main once #338 merges. The migrated occurrences cookie sort type-checks because #338 already adds it to schema.graphql.

Test plan

  • pnpm codegen generates mcp-server-consent/src/__generated__/ (all 13 ops validate against the schema)
  • pnpm --dir packages/mcp/mcp-server-consent typecheck
  • pnpm --dir packages/mcp/mcp-server-consent test (15 passing)
  • pnpm --dir packages/mcp/mcp-server-consent build
  • oxlint / oxfmt clean
  • pre-commit + pre-push hooks (quality:fix, full typecheck + tests) pass

Made with Cursor

…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.
@linear-code

linear-code Bot commented Jul 24, 2026

Copy link
Copy Markdown

ZEL-8118

@pkg-pr-new

pkg-pr-new Bot commented Jul 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

@transcend-io/airgap.js-types

pnpm add https://pkg.pr.new/@transcend-io/airgap.js-types@340
yarn add https://pkg.pr.new/@transcend-io/airgap.js-types@340.tgz

@transcend-io/cli

pnpm add https://pkg.pr.new/@transcend-io/cli@340
yarn add https://pkg.pr.new/@transcend-io/cli@340.tgz

@transcend-io/design-tokens

pnpm add https://pkg.pr.new/@transcend-io/design-tokens@340
yarn add https://pkg.pr.new/@transcend-io/design-tokens@340.tgz

@transcend-io/internationalization

pnpm add https://pkg.pr.new/@transcend-io/internationalization@340
yarn add https://pkg.pr.new/@transcend-io/internationalization@340.tgz

@transcend-io/privacy-types

pnpm add https://pkg.pr.new/@transcend-io/privacy-types@340
yarn add https://pkg.pr.new/@transcend-io/privacy-types@340.tgz

@transcend-io/sdk

pnpm add https://pkg.pr.new/@transcend-io/sdk@340
yarn add https://pkg.pr.new/@transcend-io/sdk@340.tgz

@transcend-io/type-utils

pnpm add https://pkg.pr.new/@transcend-io/type-utils@340
yarn add https://pkg.pr.new/@transcend-io/type-utils@340.tgz

@transcend-io/utils

pnpm add https://pkg.pr.new/@transcend-io/utils@340
yarn add https://pkg.pr.new/@transcend-io/utils@340.tgz

@transcend-io/mcp

pnpm add https://pkg.pr.new/@transcend-io/mcp@340
yarn add https://pkg.pr.new/@transcend-io/mcp@340.tgz

@transcend-io/mcp-server-admin

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-admin@340
yarn add https://pkg.pr.new/@transcend-io/mcp-server-admin@340.tgz

@transcend-io/mcp-server-assessment

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-assessment@340
yarn add https://pkg.pr.new/@transcend-io/mcp-server-assessment@340.tgz

@transcend-io/mcp-server-base

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-base@340
yarn add https://pkg.pr.new/@transcend-io/mcp-server-base@340.tgz

@transcend-io/mcp-server-consent

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-consent@340
yarn add https://pkg.pr.new/@transcend-io/mcp-server-consent@340.tgz

@transcend-io/mcp-server-discovery

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-discovery@340
yarn add https://pkg.pr.new/@transcend-io/mcp-server-discovery@340.tgz

@transcend-io/mcp-server-docs

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-docs@340
yarn add https://pkg.pr.new/@transcend-io/mcp-server-docs@340.tgz

@transcend-io/mcp-server-dsr

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-dsr@340
yarn add https://pkg.pr.new/@transcend-io/mcp-server-dsr@340.tgz

@transcend-io/mcp-server-inventory

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-inventory@340
yarn add https://pkg.pr.new/@transcend-io/mcp-server-inventory@340.tgz

@transcend-io/mcp-server-preferences

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-preferences@340
yarn add https://pkg.pr.new/@transcend-io/mcp-server-preferences@340.tgz

@transcend-io/mcp-server-workflows

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-workflows@340
yarn add https://pkg.pr.new/@transcend-io/mcp-server-workflows@340.tgz

commit: c68b4ef

dsklyar added 2 commits July 24, 2026 12:17
…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 dawson-turechek-transcend left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@giacaglia giacaglia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

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.

3 participants