Skip to content

chore: update schemas from constructive-db - #1945

Open
Anmol1696 wants to merge 1 commit into
mainfrom
schema-update/20261029-060751
Open

Anmol1696 wants to merge 1 commit into
mainfrom
schema-update/20261029-060751

Conversation

@Anmol1696

Copy link
Copy Markdown
Contributor

Automated Schema + SDK Update

This PR was created by the schema-propagation workflow.

What changed

Updated schema files from constructive-db and regenerated ALL SDK clients.

Source: constructive-db@63c6d726a89

Schemas updated

  • sdk/constructive-sdk/schemas/ — all API targets from constructive-db (auto-discovered)
  • sdk/migrate-client/schemas/ — migrate
  • pgpm/export/src/meta-export-tables.json — generated meta export table list

Clients regenerated

  • sdk/constructive-sdk/src/ — ORM client
  • sdk/constructive-cli/src/ — CLI client
  • sdk/constructive-react/src/ — React hooks
  • sdk/migrate-client/src/ — Migrate client

Skill references updated

  • .agents/skills/ — Generated skill documentation

Auto-generated by constructive-hub schema-propagation

Auto-generated by schema-propagation workflow.
Source: constructive-db@63c6d726a89
@tenki-reviewer

tenki-reviewer Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review complete. 🟡 2 medium

💬 Inline comments (1)

📍 Findings outside the diff (1) — 🟡 1 medium — defects on lines GitHub can't attach comments to

🟡 Medium — Remove resolve*/apiSchemaNames/dbname API surface · sdk/constructive-react/src/api/hooks/queries/index.ts

The regenerated SDKs delete the hooks useResolveRouteQuery, useResolveDeepLinkQuery, useApiSchemaNamesQuery, and useResolveSiteAppLinksQuery plus the matching root fields and the ResolveRouteRecord type from every checked-in schema; the api ORM also drops the apiSchemaNames/resolveDeepLink/resolveRoute/resolveSiteAppLinks query operations and removes the dbname field (with DBNAME_ASC/DBNAME_DESC order-by values) from Api/PlatformApi across all generated surfaces. External consumers importing the removed exports, calling the removed ORM operations, or selecting dbname will fail at build time or with GraphQL validation errors after upgrade. Stale skill docs under .agents/skills/hooks-api/references/ (api-schema-names.md, resolve-route.md, resolve-deep-link.md, resolve-site-app-links.md) and .agents/skills/orm-api/references/resolve-deep-link.md still instruct using the deleted hooks.

🧹 Nitpicks (5) — 🟢 5 low
  • 🟢 BuilderBinding surface removed in rename (compute.graphql) — The regenerated SDKs delete the entire BuilderBinding/PlatformBuilderBinding surface — types, hooks such as useBuilderBindingQuery, *BuilderBinding* mutations, builderBindingMutationKeys, ORM models and client keys, and the namespace.builderBindings / platformNamespace.platformBuilderBindingsByNamespaceId relations — replacing it with ServiceBinding/PlatformServiceBinding (new kind and installationScope fields, realm dropped).
  • 🟢 Default empty select breaks sign-in-options query (sign-in-options.ts:21) — The new sign-in-options CLI command builds its selection with buildSelectFromPaths((argv.select as string) ?? ''), which returns an empty selection when --select is omitted (sdk/constructive-cli/src/auth/cli/commands/sign-in-options.ts:21).
  • 🟢 Codegen insertion mangles queryKeys JSDoc (query-keys.ts:57) — In sdk/constructive-react/src/remote/hooks/query-keys.ts the generated customQueryKeys block was inserted between } as const; and the pre-existing doc comment, leaving an orphaned / at line 57 whose body contains raw // ==== banner lines instead of the Unified query key store documentation (sdk/constructive-react/src/remote/hooks/query-keys.ts:57-63).
  • 🟢 Add required isJunction to MetaTable (schema-types.ts:1234) — The regenerated MetaTable interface gains a required isJunction: boolean field in all four generated copies of the meta schema types, including sdk/constructive-react/src/config/schema-types.ts and sdk/constructive-react/src/infra/schema-types.ts.
  • 🟢 JSON-string --input never parsed in handoff command (exchange-native-handoff.ts:33) — The new exchange-native-handoff command passes the user-supplied input value straight through unflattenDotNotation, which only rebuilds dot-notation keys and leaves a plain string untouched (sdk/constructive-cli/src/auth/cli/commands/exchange-native-handoff.ts:33).

This is a coordinated schema-and-clients regeneration commit: the per-domain .graphql snapshots in sdk/constructive-sdk/schemas were refreshed from the live APIs and all three downstream client packages were re-emitted from them.

Files Change
sdk/constructive-sdk/schemas/*.graphql, sdk/migrate-client/schemas/migrate.graphql Schema snapshots updated: BuilderBinding/PlatformBuilderBinding removed in favor of ServiceBinding/PlatformServiceBinding, dbname dropped from Api, new reserved-subdomain/auth mutations, and Meta* gains allowedValues/isJunction-style introspection fields
sdk/constructive-sdk/src/**/orm, sdk/constructive-cli/src/**/orm Regenerated ORM models, input types, and query/mutation factories; removed builder-binding models and resolve*/apiSchemaNames query ops; added service-binding and platformReservedSubdomain models
sdk/constructive-cli/src/**/cli/commands New/updated CLI commands for reserved subdomains, service bindings, sign-in options, exchange-native-handoff, and deep-link/route resolution
sdk/constructive-react/src/** Regenerated React Query hooks, query/mutation keys, invalidation maps, and schema types mirroring the SDK changes

The removals are breaking for external consumers of the published SDK surface, and two regenerated CLI commands (exchangeNativeHandoff, signInOptions) have wiring bugs noted below.

Reviewed commit: 22038e6

@tenki-reviewer tenki-reviewer Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regenerates all GraphQL schemas and SDK clients (constructive-sdk, constructive-cli, constructive-react) to reflect backend changes: builder-binding rename to service-binding, new PlatformReservedSubdomain CRUD, exchangeNativeHandoff and signInOptions auth surface, and enriched Meta* schema introspection.

Key findings

Comment on lines +44 to +45
.execute();
console.log(JSON.stringify(result, null, 2));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 bug · medium

New CLI commands exit 0 on API errors

The newly generated CLI commands call .execute(), which resolves with { ok: false, errors } instead of throwing when the server returns GraphQL or HTTP errors (sdk/constructive-sdk/src/auth/orm/client.ts:64), then print the raw JSON and fall through to exit code 0 (sdk/constructive-cli/src/auth/cli/commands/exchange-native-handoff.ts:44). Scripts and CI invoking csdk cannot detect failures: a failed sign-in-options query or exchangeNativeHandoff mutation is reported as success. The same pattern appears in sdk/constructive-cli/src/auth/cli/commands/sign-in-options.ts at line 28.

📋 Prompt for AI Agents

In the newly generated CLI commands (sdk/constructive-cli/src/auth/cli/commands/exchange-native-handoff.ts lines 44-45 and sign-in-options.ts lines 28-29, plus any other new commands sharing the pattern), execute() returns { ok, data, errors } and never throws on GraphQL errors, so the commands exit 0 even when the API call failed. After awaiting execute(), add: if (!result.ok) { console.error(result.errors); process.exit(1); } before printing the result, so scripts can detect failures via exit code. Since the files are generated, apply the fix in the @constructive-io/graphql-codegen CLI command template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant