fix: add graphql-query dep to SDK packages + break cyclic workspace dependency#1029
Merged
pyramation merged 2 commits intomainfrom Apr 27, 2026
Merged
fix: add graphql-query dep to SDK packages + break cyclic workspace dependency#1029pyramation merged 2 commits intomainfrom
pyramation merged 2 commits intomainfrom
Conversation
…ate ORM code PR #1023 changed codegen templates to import from @constructive-io/graphql-query/runtime instead of directly from @constructive-io/graphql-types and @0no-co/graphql.web. The SDK packages (constructive-cli, constructive-sdk, constructive-react, migrate-client) were missing @constructive-io/graphql-query as a dependency, causing TS2307 'Cannot find module' errors when building regenerated code. Fix: - Add @constructive-io/graphql-query: workspace:^ to all 4 SDK package.json - Regenerate all SDK ORM code with updated codegen templates
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:
|
…hile-settings -> pgsql-test) Break the cyclic dependency chain that prevented pgsql-test from building in CI. The cycle was: pgsql-client -> @pgpmjs/core -> @pgpmjs/migrate-client -> @constructive-io/graphql-query -> graphile-settings -> pgsql-test -> pgsql-client Both removed deps were phantom (declared but never imported in source): - @pgpmjs/core listed @pgpmjs/migrate-client as a production dep but never imports it in src/ - graphile-settings listed pgsql-test as a devDep but never imports it in src/
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
Two fixes for CI build failures:
1. Missing SDK dependency (from PR #1023)
Fixes the
TS2307: Cannot find module '@constructive-io/graphql-query/runtime'build errors introduced by PR #1023.PR #1023 changed the codegen templates to import from
@constructive-io/graphql-query/runtime(consolidating@constructive-io/graphql-typesand@0no-co/graphql.webbehind a single runtime module), but didn't add@constructive-io/graphql-queryas a dependency to the SDK packages that consume the generated code. When the SDK code is regenerated, the new import paths can't resolve.Changes:
"@constructive-io/graphql-query": "workspace:^"topackage.jsonfor all 4 affected SDK packages:sdk/constructive-clisdk/constructive-sdksdk/constructive-reactsdk/migrate-clientclient.tsandquery-builder.tsfiles so they use the new@constructive-io/graphql-query/runtimeimport path (previously@constructive-io/graphql-typesand@0no-co/graphql.web)sdk/constructive-nodewas not changed — it re-exports fromconstructive-sdkand has no generated ORM code of its own.2. Cyclic workspace dependency breaking pgsql-test builds
Removed two phantom dependencies (declared in
package.jsonbut never imported in source code) that created a cyclic dependency chain preventingpnpm buildfrom determining correct topological build order:This cycle caused
pgsql-test(and its ~47 downstream CI test jobs) to fail when building from cleandist/folders, because pnpm couldn't guarantee thatpgsql-clientandpgsql-seedwere built beforepgsql-test.Removed:
@pgpmjs/migrate-clientfrompgpm/core/package.jsondependencies —@pgpmjs/corenever imports from@pgpmjs/migrate-clientin its sourcepgsql-testfromgraphile/graphile-settings/package.jsondevDependencies —graphile-settingsnever imports frompgsql-testin its sourceAfter removal,
pnpm installno longer reports cyclic workspace dependencies, andpnpm -r run clean && pnpm -r run buildcompletes successfully.Review & Testing Checklist for Human
pgpm/core/src/for any import/require of@pgpmjs/migrate-client, and grepgraphile/graphile-settings/src/for any import/require ofpgsql-test. Neither should appear. If either does, the removal will break that package at runtime.pnpm-lock.yamlchanges are only the expected removals + 4 new dependency links — the lockfile diff is large due to@types/nodeversion resolution changes (25.5.0→22.19.15) which are a cosmetic side effect of thepnpm removecommands, not a functional change@0no-co/graphql.weband@constructive-io/graphql-typesare still needed as direct dependencies in each SDK package, or if they're now dead weight (thenode-fetch.tstemplate still imports@constructive-io/graphql-typesdirectly, so at least that one likely needs to stay)@constructive-io/graphql-codegenwithorm: truewill also need@constructive-io/graphql-queryin their dependencies. This gap exists in the codegen itself (it doesn't manage consumer deps). Worth a follow-up to document this or have codegen warn/auto-add.Recommended test:
pnpm -r run clean && pnpm -r run buildfrom the repo root — this validates both that the SDK packages resolve the new import and that the cyclic dependency no longer blockspgsql-testfrom building.Notes
@types/nodeversion resolution change in the lockfile (25.5.0→22.19.15) is a harmless side effect of pnpm re-resolving after the dependency removals. It does not change which@types/nodeversion is installed.Link to Devin session: https://app.devin.ai/sessions/18879be982854a40abe5c9b915aa4a84
Requested by: @pyramation