Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: visitor-plugin-common: generateImportStatement emits invalid import * from '...'#10882

Merged
eddeee888 merged 2 commits into
dotansimha:masterdotansimha/graphql-code-generator:masterfrom
wassim-k:fix/empty-import-statementwassim-k/graphql-code-generator:fix/empty-import-statementCopy head branch name to clipboard
Jul 23, 2026
Merged

fix: visitor-plugin-common: generateImportStatement emits invalid import * from '...'#10882
eddeee888 merged 2 commits into
dotansimha:masterdotansimha/graphql-code-generator:masterfrom
wassim-k:fix/empty-import-statementwassim-k/graphql-code-generator:fix/empty-import-statementCopy head branch name to clipboard

Conversation

@wassim-k

Copy link
Copy Markdown
Contributor

Description

When an import has no named identifiers, generateImportStatement falls back to *, producing import * from '...' — a namespace import with no binding (invalid TS). Hit when a document-only fragment import (kind: 'document') is rendered in type mode, e.g. typescript-operations + inlineFragmentTypes: 'combine' | 'mask'.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Run tests in the codebase and ran it against a large codebase with the near-operation-file preset mentioned below.

Test Environment:

  • OS: Windows
  • @graphql-codegen/visitor-plugin-common:
  • NodeJS: v24.18.0

Further comments

This issue is blocking graphql-code-generator-community/pull/1530

@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6cb8d44

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

This PR includes changesets to release 1 package
Name Type
@graphql-codegen/visitor-plugin-common Patch

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

@eddeee888

Copy link
Copy Markdown
Collaborator

Thank you! Apologies for the delay

@eddeee888
eddeee888 merged commit 206a409 into dotansimha:master Jul 23, 2026
20 checks passed
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.