Repository navigation
Conversation
Auto-generated by schema-propagation workflow. Source: constructive-db@0ff2de29c89
|
Review complete. 🟡 4 medium 💬 Inline comments (3)
📍 Findings outside the diff (1) — 🟡 1 medium — defects on lines GitHub can't attach comments to🟡 Medium — Tree-nodes models emit unsupported where/orderBy args · getAllTreeNodesRecord.ts:45–61 · // sdk/constructive-react/src/compute/orm/models/getAllTreeNodesRecord.ts
45 const { document, variables } = buildFindManyDocument(
46 'GetAllTreeNodesRecord',
47 'getAllTreeNodes',
48 args.select,
49 {
50 where: args?.where,
51 orderBy: args?.orderBy as string[] | undefined,
52 first: args?.first,
53 last: args?.last,
54 after: args?.after,
55 before: args?.before,
56 offset: args?.offset,The generated The same defects appear in 🧹 Nitpicks (1) — 🟢 1 low
This is a pure regeneration PR: all 691 changed files are generated artifacts across four SDK packages plus auto-generated
Reviewed commit: 3f99985 |
There was a problem hiding this comment.
This PR regenerates the SDK packages (constructive-cli, constructive-react, constructive-sdk, migrate-client) and skill reference docs after upstream GraphQL schema changes: BuilderBinding is replaced by ServiceBinding, read-shaped create mutations and resolve-route/deep-link queries are removed, and new auth mutations (ensureAuthCsrf, exchangeNativeHandoff), config secret surfaces, platformReservedSubdomain, and resource health/utilization queries are added.
Key findings
- 🟡 CLI
file updateforwards fields absent fromFilePatch— file.ts:343 - 🟡 Tree-nodes models emit unsupported where/orderBy args — getAllTreeNodesRecord.ts:45
- 🟡
useCreatePrincipalMutationlost list invalidation — useCreatePrincipalMutation.ts:44 - 🟡
useCreateFunctionGraphMutationlost list invalidation — useCreateFunctionGraphMutation.ts:46
| downloadUrl: cleanedData.downloadUrl, | ||
| expiryEnqueuedAt: cleanedData.expiryEnqueuedAt, | ||
| filePath: cleanedData.filePath, |
There was a problem hiding this comment.
🟡 bug · medium
CLI file update forwards fields absent from FilePatch
The regenerated cnc file update and platform-file update commands forward downloadUrl and filePath in the mutation's data object (sdk/constructive-cli/src/storage/cli/commands/file.ts:343-345), but neither field exists on FilePatch nor on PlatformFilePatch. Since cleanedData is cast to the patch type, cleanedData.downloadUrl and cleanedData.filePath are invalid property accesses and the package fails to compile; if type-checking is bypassed, the GraphQL server rejects the unknown input fields and every file update / platform-file update invocation errors out.
The same defect appears in sdk/constructive-cli/src/storage/cli/commands/platform-file.ts at lines 337-339.
📋 Prompt for AI Agents
In sdk/constructive-cli/src/storage/cli/commands/file.ts (lines 343 and 345) and sdk/constructive-cli/src/storage/cli/commands/platform-file.ts (lines 337 and 339), delete the downloadUrl: cleanedData.downloadUrl, and filePath: cleanedData.filePath, entries from the update data object, and remove any corresponding prompt entries, because FilePatch and PlatformFilePatch (sdk/constructive-cli/src/storage/orm/input-types.ts) do not define these fields and the code currently fails to compile. Prefer regenerating the CLI with @constructive-io/graphql-codegen if that is the standard workflow.
| mutationKey: customMutationKeys.createPrincipal(), | ||
| mutationFn: (variables: CreatePrincipalVariables) => | ||
| getClient() | ||
| .principal.create({ | ||
| data, | ||
| .mutation.createPrincipal(variables, { | ||
| select: args.select, | ||
| }) | ||
| } as { | ||
| select: S; | ||
| } & StrictSelect<S, CreatePrincipalPayloadSelect>) | ||
| .unwrap(), | ||
| onSuccess: () => { | ||
| queryClient.invalidateQueries({ | ||
| queryKey: principalKeys.lists(), | ||
| }); | ||
| }, | ||
| ...mutationOptions, | ||
| }); | ||
| } |
There was a problem hiding this comment.
🟡 bug · medium
useCreatePrincipalMutation lost list invalidation
The rewritten useCreatePrincipalMutation no longer invalidates principalKeys.lists() on success (sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalMutation.ts:44-55), whereas the hook this patch replaces did. Since the same patch removes the Principal table create mutation and PrincipalModel.create, this hook is now the only create path in the React SDK, yet the principals list cache is never marked dirty after a successful create. Consumers render a stale principal list — missing the new principal or showing deleted ones — until the query goes stale or a refetch occurs.
📋 Prompt for AI Agents
In sdk/constructive-react/src/auth/hooks/mutations/useCreatePrincipalMutation.ts around lines 40-55, import useQueryClient from '@tanstack/react-query' and principalKeys from '../query-keys', create the query client, and add onSuccess: () => { queryClient.invalidateQueries({ queryKey: principalKeys.lists() }); } before ...mutationOptions in the useMutation config, so newly created principals appear in cached lists. Note the file is generated; prefer fixing the codegen template if the hook is regenerated.
| return useMutation({ | ||
| mutationKey: functionGraphMutationKeys.create(), | ||
| mutationFn: (data: CreateFunctionGraphInput['functionGraph']) => | ||
| mutationKey: customMutationKeys.createFunctionGraph(), | ||
| mutationFn: (variables: CreateFunctionGraphVariables) => | ||
| getClient() | ||
| .functionGraph.create({ | ||
| data, | ||
| .mutation.createFunctionGraph(variables, { | ||
| select: args.select, | ||
| }) | ||
| } as { | ||
| select: S; | ||
| } & StrictSelect<S, CreateFunctionGraphPayloadSelect>) | ||
| .unwrap(), | ||
| onSuccess: () => { | ||
| queryClient.invalidateQueries({ | ||
| queryKey: functionGraphKeys.lists(), | ||
| }); | ||
| }, | ||
| ...mutationOptions, | ||
| }); | ||
| } |
There was a problem hiding this comment.
🟡 bug · medium
useCreateFunctionGraphMutation lost list invalidation
The rewritten useCreateFunctionGraphMutation dropped the onSuccess invalidation of functionGraphKeys.lists() (sdk/constructive-react/src/compute/hooks/mutations/useCreateFunctionGraphMutation.ts:46-58) that the previous generated hook performed. The patch simultaneously removes the FunctionGraph table create mutation backing the old hook, so after creating a graph through this hook the useFunctionGraphsQuery cache is never refreshed. Users see the new graph only after the list query goes stale or the page remounts.
📋 Prompt for AI Agents
In sdk/constructive-react/src/compute/hooks/mutations/useCreateFunctionGraphMutation.ts around lines 46-58, import useQueryClient from '@tanstack/react-query' and functionGraphKeys from '../query-keys', create the query client, and add onSuccess: () => { queryClient.invalidateQueries({ queryKey: functionGraphKeys.lists() }); } before ...mutationOptions in the useMutation config so the function graph list refreshes after createFunctionGraph succeeds. Prefer fixing the codegen template since the file is generated.
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@0ff2de29c89Schemas 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