Repository navigation
fix: Runtime scalars failing validation during HMR and builds - #1751
Merged
AlecAivazis merged 1 commit intoSep 27, 2026
Merged
AlecAivazis merged 1 commit into
AlecAivazis merged 1 commit into
Conversation
The rewrite recorded each runtime scalar as an argument value keyed by the variable's id, but that column is a foreign key to documents. It only held while a document happened to share the id, so HMR re-extraction and parallel loading in houdini generate broke it. Because the FK is deferred, the violation surfaced at COMMIT and was discarded, rolling every rewrite back while AfterExtract reported success. The ncruces backend dropped that commit error too, so the guard never fired on WASI.
🦋 Changeset detectedLatest commit: 2999494 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Contributor
Author
|
I should probably note that this doesn't only affect HMR. It has a chance to break any client generation. In our application, this means about 10% of production builds fail. |
AlecAivazis
approved these changes
Sep 27, 2026
Collaborator
|
Thanks for fixing this! |
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.
Runtime scalar variable ids were being saved in the
argument_values(document)column, which is a FK fordocuments(id). By coincidence, this worked most of the time becuase there are typically more documents than runtime scalar variables. However, during HMR the ids were autoincremented, which inevitibly lead to a FK violation when the variable ids didn't happen to match a document id anymore.Now, the
documentcolumn correctly holds a document id and FK violations aren't silently dropped anymore.To help everyone out, please make sure your PR does the following:
pnpm run testsandcd integration && pnpm run testspnpm changeset