fix: fail fast on Node < 22 — root cause of the "grafast ConnectionStep" list/connection failures#1460
Merged
Merged
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Root cause of the list/connection "bug": there is no grafast/plugin bug — the failures only occur when the server runs on Node < 22.
grafast@1.0.2and@dataplan/pg@1.0.3declareengines.node >= 22and callPromise.withResolvers()(Node 22+) inside their query-execution paths (@dataplan/pg/dist/executor.js,grafast/dist/prepare.js). On Node 20 this doesn't fail fast: the PgSelect collection value ends upundefined, and every connection query ({ things { nodes { … } } }) dies insideConnectionStep.executewith:while mutations and single-record lookups keep working — exactly the symptom that caused the e2e assertions to be
it.skip'd / rewritten as mutations. Reproduced deterministically: the same suites fail on Node 20.18 and pass on Node 22 against the same database. CI runs Node 22, which is why CI was always green.Tests: every test skipped for this bug was already re-enabled on main (8e8744d,
test(server-test): unskip connection-query integration tests) — noit.skipor mutation workarounds remain (verified by search). Verified locally on Node 22:graphql/server-test140/140 pass (incl. scoped-routing golden path, server.integration all 5 scenarios, express-context, upload w/ MinIO),graphql/test20/20,graphile/graphile-test21/21.Changes (fail fast + document, no behavior change on supported Node):
createConstructivePreset()now throws at preset construction whenPromise.withResolversis missing, naming the real requirement and the misleading symptom — so any schema built from the Constructive preset fails loudly instead of breaking only connection queries at runtime.engines.node:>=18.17.0→>=22; added.nvmrc(22).No upstream grafast issue to report and no version bump needed:
grafast@1.1.0'sconnection.jsis byte-identical to1.0.2's, and@dataplan/pg@1.1.1has no relevant fix — the pinned versions are correct when run on a supported Node.Note:
pnpm lintis currently broken repo-wide (ESLint 9 installed but only a legacy.eslintrc.jsonexists; CI does not run lint) — pre-existing and untouched here.Link to Devin session: https://app.devin.ai/sessions/d7f278d4eb5b4e459e102150e48cfc4f
Requested by: @pyramation