fix(graphql-codegen): re-export input types from generated ORM index#890
Merged
pyramation merged 2 commits intomainfrom Mar 25, 2026
Merged
fix(graphql-codegen): re-export input types from generated ORM index#890pyramation merged 2 commits intomainfrom
pyramation merged 2 commits intomainfrom
Conversation
The generated ORM index.ts was missing `export * from './types'`, which
meant that input types like SecureTableProvision, RelationProvision,
Blueprint, Field, Index, Policy, FullTextSearch, etc. were not accessible
through the public namespace (e.g. `import { public_ } from '@constructive-io/sdk'`).
This adds the missing re-export so downstream consumers can import these
types directly without reaching into internal paths.
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:
|
…ween select-types and input-types
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
The generated ORM
index.tswas missingexport * from './types', which meant input types likeSecureTableProvision,RelationProvision,Blueprint,Field,Index,Policy,FullTextSearch, etc. were not accessible through the SDK's public namespace.Previously, only
select-typesandmodelswere re-exported from the ORM index. Thetypes.tsbarrel (which chains toinput-types.tsviaexport * from './input-types') was generated but never wired into the index — so consumers couldn't do:Changes
client-generator.ts: Addedexport * from './types'to the generated ORMindex.tsexport type { ConnectionResult, PageInfo } from './select-types'to resolve TS2308 ambiguity (bothselect-typesandinput-typesdefine these interfaces; the explicit re-export tells TypeScript to prefer theselect-typesversions)Name collision fix
A naive
export * from './types'causes TS2308 errors becauseConnectionResultandPageInfoare defined in bothselect-types.ts(template) andinput-types.ts(generated from schema). TypeScript's recommended resolution is an explicit named re-export, which is what this PR adds. Verified locally against@constructive-io/sdk@0.11.1—tsc --noEmitpasses cleanly on a downstream consumer after patching.Review & Testing Checklist for Human
ConnectionResultandPageInfowere found to conflict betweenselect-typesandinput-types. After regenerating the SDK, runtsc --noEmiton a downstream consumer (e.g.agentic-db) to confirm no other names clash. The check was done against SDK 0.11.1 — a fresh regeneration may surface new conflicts if types were added since.import type { public_ } from '@constructive-io/sdk'; type T = public_.SecureTableProvision;compiles cleanly.input-typesstandalone usage: Confirm that files importing directly from./input-types(e.g. model files, custom-ops) still compile, sinceConnectionResult/PageInforemain declared there (just also explicitly re-exported fromselect-typesin the index).Notes
types.tsbarrel file was already being generated bygenerateTypesBarrel()inbarrel.ts— it just was never re-exported from the ORMindex.ts. This fix wires it in.agentic-db) is blocked on this fix to replace hand-rolled type definitions with SDK imports.Link to Devin session: https://app.devin.ai/sessions/ce1b2dafd42341bea5d7793b0c05ba6c
Requested by: @pyramation