Filter empty files to prevent GraphQL codegen plugin configuration errors#393
Conversation
🦋 Changeset detectedLatest commit: 36f2525 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Have the same issue, this fixed it. |
|
Hi @sammwafy ! |
|
Hi @eddeee888 |
|
Hi @sammwafy , Thanks for the details, may I ask when it would get to this situation? I've tried this on my side but cannot reproduce it. |
|
Thank you @sammwafy ! I've added a test and fixed a few files for the release |
Fix GraphQL Codegen Plugin Configuration Issues
Issue
The GraphQL codegen was failing if files included in tsconfig were empty:
Invalid plugin configuration: Empty source files were being processed, causing the
addplugin to fail with:Solution
✅ Filter out empty source files
.filter()to skip files with no meaningful content before processingResults
src/test/*.tsxandsrc/**/*.tsxincludes — codegen now runs successfully without errorsTesting
Verified the fix works with multiple file patterns and confirmed no regressions in existing functionality.