Skip to content

chore: update schemas from constructive-db - #2015

Closed
Anmol1696 wants to merge 1 commit into
mainfrom
schema-update/20261117-062654
Closed

Anmol1696 wants to merge 1 commit into
mainfrom
schema-update/20261117-062654

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@2708b0bd5ae

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@2708b0bd5ae
@luxor-code-review

luxor-code-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Review complete. 🟡 4 medium

💬 Inline comments (4)

🧹 Nitpicks (1) — 🟢 1 low
  • 🟢 Remove Upload scalar and *Upload write inputs (storage.graphql:1887) — The regenerated schemas drop the Upload scalar and all multipart write paths: the createFile/createPlatformFile mutations and their input/payload types (storage.graphql:1887), the *Upload patch fields profilePictureUpload (auth.graphql), logoUpload/faviconUpload/ogImageUpload/appleTouchIconUpload (api.graphql:24215), logsUpload/logoUpload (compute.graphql:710), and uploadUpload on FilePatch/PlatformFilePatch (storage.graphql:1181).

This PR is a codegen regeneration sweep across the SDK packages, driven by GraphQL schema additions (graphile-meta metadata fields, file versions, auth requestDeviceApproval/exchangeNativeHandoff) plus a query-builder change that now recurses into buildSelections for nested arg-field selections. Removed queries, mutations, inputs, and enum values are intentional API-surface pruning.

Files Change
sdk/constructive-sdk/schemas/*.graphql, sdk/migrate-client/schemas/migrate.graphql Regenerated SDL reflecting new meta fields, file-version fields, auth device-approval mutations, and removals of deprecated queries/inputs/scalars
sdk/constructive-{sdk,react,cli}/src/*/orm/query-builder.ts Nested selections under arg-fields now go through recursive buildSelections instead of emitting bare field names
sdk/constructive-{sdk,react,cli}/src/*/orm/*, hooks, cli/commands Regenerated models, mutation builders, hooks, and CLI commands matching the new schema surface, including removals of dropped operations
.agents/skills/** Skill reference docs regenerated to mirror the new SDK surface

Reviewed commit: ef3105b

@luxor-code-review luxor-code-review 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 the GraphQL SDK surface (schemas, ORM query builders, hooks, CLI) from schema changes that add meta/file-version fields and auth device-approval mutations, and fixes nested selection building in the ORM query builder.

Key findings

Comment on lines 26013 to 26016
_meta: MetaSchema
apiSchemaNames(targetApiId: UUID): JSON

"""Reads and enables pagination through a set of `ApiSchema`."""
apiSchemas(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 breaking-change · medium

Drop resolveRoute and sibling root queries

Four root Query fields — apiSchemaNames(targetApiId), resolveDeepLink, resolveRoute, and resolveSiteAppLinks — plus the ResolveRouteRecord type are deleted from sdk/constructive-sdk/schemas/api.graphql (the Query block now goes straight from _meta at line 26013 to apiSchemas at line 26016). The repo's own React hooks and CLI commands that used them were removed in this PR, so the removal is intentional, but any external consumer of the published schema calling these fields gets hard validation errors; the corresponding generated React hooks and index re-exports (e.g. sdk/constructive-react/src/auth/hooks/mutations/index.ts:15) were deleted along with the create mutations for PrincipalEntity and related record types, so downstream consumers also break at compile time. No deprecated alias or documented migration path ships with the change.

📋 Prompt for AI Agents

In sdk/constructive-sdk/schemas/api.graphql, the root queries apiSchemaNames, resolveDeepLink, resolveRoute, resolveSiteAppLinks and type ResolveRouteRecord were removed (in-repo hooks/CLI consumers were deleted in the same change). Add changelog entries describing this breaking removal and, where a replacement surface exists, the migration path for external clients; otherwise consider re-adding the fields as @deprecated for one transition release.

const subSelections = Object.entries(nestedSelect)
.filter(([, v]) => v)
.map(([name]) => t.field({ name }));
const subSelections = buildSelections(nestedSelect, connectionFieldsMap);

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

Nested args select now throws on empty objects

The nested-select handling in the args branch was replaced with a recursive buildSelections call (sdk/constructive-sdk/src/api/orm/query-builder.ts:143, replicated in 12 sibling generated copies), but buildSelections throws Invalid selection for field "..." when a value is a truthy object without a select key (line 165). The replaced code emitted a bare t.field({ name }) for any truthy value, including {}. Callers passing select: { someField: {} } under an args-style field now get an exception instead of a working query, and truthy scalar values other than true are now silently dropped from the document.

📋 Prompt for AI Agents

In sdk/constructive-sdk/src/api/orm/query-builder.ts (and the identical generated copies under src/{agent,auth,compute,config,infra,modules,objects,remote,storage,usage,admin}/orm/query-builder.ts and sdk/constructive-cli/src/*/orm/query-builder.ts), inside buildSelections before the if (!nested.select ...) throw branch (~line 164): add a branch that treats an object value with no select, args, filter, orderBy, first, or connection key as a bare field (push t.field({ name: key }) and continue). This restores pre-change behavior where nested select values like {} were emitted as plain fields. Apply the same edit to all copies, which share the same content hash.

@@ -13930,7 +13702,7 @@ type FunctionDeployment {
"""
Reads a single `Namespace` that is related to this `FunctionDeployment`.
"""
namespace: Namespace
namespaceByNamespaceIdAndDatabaseId: Namespace

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 breaking-change · medium

Remove BuilderBinding surface and rename namespace relations

The compute schema deletes the entire BuilderBinding/PlatformBuilderBinding surface — types, filters, inputs, order-by enums, root queries, CRUD mutations, and the Namespace.builderBindings relations — replacing it with ServiceBinding/PlatformServiceBinding (with new installationScope and kind fields). Belongs-to relation fields are also renamed without deprecation: namespace → namespaceByNamespaceIdAndDatabaseId on FunctionDeployment, RegistryBinding, Resource, ResourceDefinition, and ResourceInstallation (sdk/constructive-sdk/schemas/compute.graphql:13705 and siblings), with Namespace reverse connections renamed likewise. External clients querying the old names fail validation; in-repo generated code is already updated.

📋 Prompt for AI Agents

In sdk/constructive-sdk/schemas/compute.graphql, BuilderBinding/PlatformBuilderBinding were replaced by ServiceBinding/PlatformServiceBinding (new required fields installationScope and kind; builder == kind 'builder') and the namespace/reverse-connection relation fields were renamed to *ByNamespaceIdAndDatabaseId forms (e.g. line 13705). Do not reintroduce the old names; instead add a CHANGELOG section in sdk/constructive-sdk enumerating each removed type and each renamed field (old and new) so downstream SDK consumers can update their queries.

"""
text: String

"""Query vector for similarity search."""
vector: [Float!]!
vector: [Float!]

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

VectorNearbyInput.vector dropped requiredness

vector: [Float!]! was changed to vector: [Float!] in VectorNearbyInput (sdk/constructive-sdk/schemas/agent.graphql:12897; same change at sdk/constructive-sdk/schemas/compute.graphql:56366). This is a breaking input-type change: codegen clients typed against a mandatory vector now accept {} at the type level and get a runtime validation or resolver error instead of a compile-time requirement. If the intent is a text-or-vector mutual exclusion, the schema no longer enforces that either argument is present.

📋 Prompt for AI Agents

In sdk/constructive-sdk/schemas/agent.graphql line 12897 and sdk/constructive-sdk/schemas/compute.graphql line 56366, VectorNearbyInput.vector was regenerated as nullable [Float!]. If the intent is that exactly one of text/vector must be provided, restore the non-null declaration vector: [Float!]! in the source plugin and regenerate, or document and release this as a breaking schema change so dependent codegen clients are regenerated.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Superseded by #2016 (merged), regenerated from current constructive-db main with codegen 5.25.33.

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