Repository navigation
Conversation
Auto-generated by schema-propagation workflow. Source: constructive-db@2708b0bd5ae
|
Review complete. 🟡 4 medium 💬 Inline comments (4)
🧹 Nitpicks (1) — 🟢 1 low
This PR is a codegen regeneration sweep across the SDK packages, driven by GraphQL schema additions (graphile-meta metadata fields, file versions, auth
Reviewed commit: ef3105b |
There was a problem hiding this comment.
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
- 🟡 Drop
resolveRouteand sibling root queries — api.graphql:26013 - 🟡 Nested args select now throws on empty objects — query-builder.ts:143
- 🟡 Remove
BuilderBindingsurface and renamenamespacerelations — compute.graphql:13705 - 🟡
VectorNearbyInput.vectordropped requiredness — agent.graphql:12897
| _meta: MetaSchema | ||
| apiSchemaNames(targetApiId: UUID): JSON | ||
|
|
||
| """Reads and enables pagination through a set of `ApiSchema`.""" | ||
| apiSchemas( |
There was a problem hiding this comment.
🟡 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); |
There was a problem hiding this comment.
🟡 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 | |||
There was a problem hiding this comment.
🟡 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!] |
There was a problem hiding this comment.
🟡 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.
|
Superseded by #2016 (merged), regenerated from current constructive-db main with codegen 5.25.33. |
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@2708b0bd5aeSchemas updated
sdk/constructive-sdk/schemas/— all API targets from constructive-db (auto-discovered)sdk/migrate-client/schemas/— migratepgpm/export/src/meta-export-tables.json— generated meta export table listClients regenerated
sdk/constructive-sdk/src/— ORM clientsdk/constructive-cli/src/— CLI clientsdk/constructive-react/src/— React hookssdk/migrate-client/src/— Migrate clientSkill references updated
.agents/skills/— Generated skill documentationAuto-generated by constructive-hub schema-propagation