Skip to content

Add typedDocumentStringTemplate to re-use across client plugins - #10863

Merged
eddeee888 merged 2 commits into
masterfrom
extract-typed-document-string-template
Jun 1, 2026
Merged

Add typedDocumentStringTemplate to re-use across client plugins#10863
eddeee888 merged 2 commits into
masterfrom
extract-typed-document-string-template

Conversation

@eddeee888

@eddeee888 eddeee888 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Since visitor-plugin-common ~v3, we've wrapped strings in TypedDocumentNode to type document strings with GraphQLResult and Variables. This is useful for clients that take strings, instead of ASTs. Most relevant PR I could find is this one

However, community packages never got these TypedDocumentNode implemented. So they were stuck on visitor-plugin-common v2.x for a long time.

This PR extracts the TypedDocumentNode template to visitor-plugin-common so they could be shared with community plugins

Related dotansimha/graphql-code-generator-community#1410, #10759

Type of change

  • New feature / refactor

How Has This Been Tested?

  • No new tests since it's a refactor, existing tests should pass

@changeset-bot

changeset-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c7de66d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@graphql-codegen/typed-document-node Patch
@graphql-codegen/visitor-plugin-common Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-codegen/visitor-plugin-common 7.1.0-alpha-20260601135711-c7de66d21cb5b847190ede1d086709fee469cc0e npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 7.0.3-alpha-20260601135711-c7de66d21cb5b847190ede1d086709fee469cc0e npm ↗︎ unpkg ↗︎

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

💻 Website Preview

The latest changes are available as preview in: https://pr-10863.graphql-code-generator.pages.dev

@eddeee888
eddeee888 merged commit 8707247 into master Jun 1, 2026
18 checks passed
@eddeee888
eddeee888 deleted the extract-typed-document-string-template branch June 1, 2026 14:24
negezor pushed a commit to senkuro-dev/graphql-code-generator that referenced this pull request Aug 14, 2026
…nsimha#10863)

* Add typedDocumentStringTemplate to re-use across client plugins that need it

* Add changeset
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.

2 participants