Repository navigation
fix: fetch schema at build time - #99
Merged
Merged
Conversation
yokelpole
marked this pull request as ready for review
November 9, 2026 23:17
Keep the schema untracked and retain main's 2.6.3 version. Allow pnpm publish scripts to run with generated build changes.
bradens
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fetch the latest schema at the start of each build and stop committing
src/resources/schema.graphql. Operation generation derives introspection from that fetched SDL, so generation, codegen validation, and the schema shipped in the npm package all use the same snapshot. Failed schema downloads stop the build.The version-bump workflow compares the fetched schema against the schema in the latest published npm package, preserving schema diff release notes and automatic minor/patch selection without schema commits.
The branch includes the latest
mainand bumps the package to2.6.4for release after merging. Both pnpm publish scripts use--no-git-checksso generated build changes do not block publishing.The release workflow also accepts a
dry_runboolean input. It uses a temporary unpublished prerelease version inside the runner, runsnpm publish --dry-runwith build hooks enabled, and skips the real publication step. Run it withgh workflow run release.yml --ref fix/update-committed-schema -f dry_run=truebefore merging, or select the dry-run input in Actions after merging.Validation:
prepublishOnlyhook enabled: network-config fetches, schema download, all 112 operations, GraphQL codegen, lint, CJS/ESM/edge builds, and publish-time rebuild.pnpm exec jest --runInBand --coverage=false --modulePathIgnorePatterns dist .worktrees; the override excludes an existing nested worktree).latesttag remains2.6.3.--dry-run --ignore-scriptsagainst a local test registry while generated files are modified.schema:diff, including GitHub Actions version-bump outputs.