fix(provision): extend blueprint types with client-side cross-ref fields + bump @constructive-io/graphql-codegen to 4.30.2#32
Merged
pyramation merged 2 commits intomainfrom Apr 18, 2026
Conversation
packages/provision declares tables, relations, and indexes using local `ref` / `table_ref` / `source_ref` / `target_ref` IDs so schemas can be written out-of-order; provisionBlueprint resolves these to `table_name` / `source_table` / `target_table` before sending the blueprint to construct_blueprint. node-type-registry@0.16.0 no longer carries these client-side fields on BlueprintTable / BlueprintIndex / BlueprintRelation. Extend the types locally in blueprint.ts (and re-export under the canonical names) so the 10 schema files and blueprint.ts itself type-check without touching any caller or weakening the server wire format. Also fixes TS7018 implicit-any[] errors on empty grant_roles / grants / policies / grant_privileges arrays inside the serverDef builder.
…uctive-io/node to ^0.10.3, graphql-server-test to ^2.12.2 Picks up the upstream embedder template fix (constructive-io/constructive#1005) so the next `pnpm generate:all` regenerates sdk/cli/generated/cli/embedder.ts with the generic autoEmbedWhere/autoEmbedInput signatures already on main, rather than the old narrow Record<string, unknown> shape that broke lerna publish with 74 TS2345 errors.
🤖 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 was referenced Apr 18, 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.
Summary
Combined version of #30 + #31 targeting
mainso the full CI suite runs (the stacked pair only got Socket Security because #31 was targeting a non-main branch).Two independent commits:
fix(provision): extend blueprint types with client-side cross-ref fields— same as #30.packages/provisiondeclares tables, relations, and indexes using localref/table_ref/source_ref/target_refIDs so schemas can be written out-of-order;provisionBlueprint()resolves them totable_name/source_table/target_tablebefore the blueprint reachesconstruct_blueprint().node-type-registry@0.16.0(pulled in by the PR chore(deps): bump all @constructive-io/* and graphile-* packages to latest #29 bump) no longer carries those fields, which brokepnpm buildacrossblueprint.tsand all 10src/schemas/*.tsfiles with ~260 TS2353/TS2339 errors.Fix is entirely at the type layer in
packages/provision/src/blueprint.ts:BlueprintTable = BaseBlueprintTable & { ref?: string }BlueprintIndexwithtable_namerelaxed to optional +table_ref?: stringAddRelationRefs<T>over theBlueprintRelationunion so every arm gains optionalsource_ref/target_refBlueprintDefinitionre-exported with the extended arraysSchemas already import from
'../blueprint', so zero caller changes — all 10 schema files type-check unchanged. Also fixes 6 TS7018 implicit-any[] errors on emptygrant_roles/grants/policies/grant_privilegesarrays.chore(deps): bump @constructive-io/graphql-codegen to 4.30.2, @constructive-io/node to ^0.10.3, graphql-server-test to ^2.12.2— same as #31.graphql-codegen@4.30.2carries the upstream embedder template fix from constructive-io/constructive#1005 — genericautoEmbedWhere<T extends object>/autoEmbedInput<T extends object>signatures, matching the hand-patchedsdk/cli/generated/cli/embedder.tsthat shipped in chore(deps): bump all @constructive-io/* and graphile-* packages to latest #29. Verified no drift:Full
pnpm buildis green across all 12 workspace projects after both commits.This supersedes #30 and #31 — happy to close those once this lands.
Review & Testing Checklist for Human
pnpm generate:alllocally and confirm the regeneratedsdk/cli/generated/cli/embedder.tsdiff is noise-only (prettier / header comments) withautoEmbedWhere<T>/autoEmbedInput<T>intact.src/schemas/crm.ts) and confirm IntelliSense still works on bothrefand the canonicalBlueprintTablefields.Notes
asannotations on empty literals, commit 2 is package.json/lockfile only.@constructive-io/cli,graphql-server,knative-job-service,playwright-test,react,sdk,@constructive-sdk/cli) are referenced from agentic-db's package graph, so nothing else to bump.Link to Devin session: https://app.devin.ai/sessions/fabecb6a46504fc293feca22d9cc91d4
Requested by: @pyramation