Skip to content

Improve static analysis speed#397

Merged
eddeee888 merged 21 commits intomasterfrom
improve-static-analysis-speed
Oct 14, 2025
Merged

Improve static analysis speed#397
eddeee888 merged 21 commits intomasterfrom
improve-static-analysis-speed

Conversation

@eddeee888
Copy link
Copy Markdown
Owner

@eddeee888 eddeee888 commented Oct 12, 2025

Previously, we run TS diagnostic every time we run codegen to see if there's any errors of added code, then remove them.
This is slow as 1. it's running the equivalent of TSC and 2. removing node after is added logic.

This PR adds a fast mode for static analysis where it compares mapper vs resolver return type using isAssignableTo which sidesteps a lot of TS compilation work mentioned above.


Before After
Screenshot 2025-10-12 at 10 14 23 pm Screenshot 2025-10-12 at 10 14 30 pm

Note: I tried making typechecking part faster (the getGraphQLObjectTypeResolversToGenerate logic) by using concurrency but TS compiler API is synchronous by nature, so it'd still execute synchronously.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Oct 12, 2025

🦋 Changeset detected

Latest commit: 109f785

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

This PR includes changesets to release 1 package
Name Type
@eddeee888/gcg-typescript-resolver-files 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

@eddeee888
Copy link
Copy Markdown
Owner Author

/release-snapshot

@github-actions
Copy link
Copy Markdown
Contributor

✅ Successfully published package/s with tag pr397-run749-1!

@eddeee888
Copy link
Copy Markdown
Owner Author

/release-snapshot

@github-actions
Copy link
Copy Markdown
Contributor

✅ Successfully published package/s with tag pr397-run750-1!

@eddeee888
Copy link
Copy Markdown
Owner Author

/release-snapshot

@github-actions
Copy link
Copy Markdown
Contributor

✅ Successfully published package/s with tag pr397-run751-1!

@eddeee888
Copy link
Copy Markdown
Owner Author

/release-snapshot

@github-actions
Copy link
Copy Markdown
Contributor

✅ Successfully published package/s with tag pr397-run752-1!

@eddeee888
Copy link
Copy Markdown
Owner Author

/release-snapshot

@github-actions
Copy link
Copy Markdown
Contributor

✅ Successfully published package/s with tag pr397-run753-1!

@eddeee888 eddeee888 marked this pull request as ready for review October 13, 2025 13:32
@eddeee888 eddeee888 merged commit e0476b3 into master Oct 14, 2025
17 checks passed
@eddeee888 eddeee888 deleted the improve-static-analysis-speed branch October 14, 2025 13:00
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.

1 participant