Skip to content

Conversation

@khelif96
Copy link
Contributor

@khelif96 khelif96 commented Feb 6, 2026

TLDR the check-schema-and-codegen lint task really annoyed me by being so slow so now it only runs on graphql changes

Summary

  • Changed lint-staged config to trigger check-schema-and-codegen only on .graphql file changes instead of all TypeScript files
  • Previously, the schema validation ran on every .ts/.tsx file change, which was inefficient since:
    • It makes a GitHub API network call on every commit
    • Runs full GraphQL codegen even for unrelated changes
    • CI already validates this with the check_codegen task

Test plan

  • Verify lint-staged runs check-schema-and-codegen when modifying .graphql files
  • Verify lint-staged does NOT run schema check when modifying only .ts/.tsx files

🤖 Generated with Claude Code

@khelif96 khelif96 requested a review from a team as a code owner February 6, 2026 18:17
Copy link
Contributor

@sophstad sophstad left a comment

Choose a reason for hiding this comment

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

I'm not sure this is desirable if we're still going to run check_codegen on every job; this just delays the signal that your codegen needs updating which may be frustrating.

What do you think of also only running check_codegen when there are GraphQL changes? If this is successful, we could also remove it from the waterfall (but perhaps not just yet because that seems like removing a lot of signal at once).

@khelif96
Copy link
Contributor Author

khelif96 commented Feb 9, 2026

Ok good point, How about 1 better and have a pr auto get created to bump types so that the types are always created and if someone takes a bit longer to merge their generated types every other user doesn't have to manually gen them

evergreen-ci/evergreen#9788

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