Skip to content

Commit 8d000bf

Browse files
committed
fix(node-type-registry): BlueprintField uses is_required, not is_not_null
The SQL function construct_blueprint() and metaschema_public.field table both use is_required for the NOT NULL constraint flag. is_not_null only exists in the low-level PostgreSQL AST package (ColumnDef parse nodes).
1 parent d2612e2 commit 8d000bf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

graphile/node-type-registry/src/blueprint-types.generated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ export interface BlueprintField {
654654
/** The PostgreSQL type (e.g., "text", "integer", "boolean", "uuid"). */
655655
type: string;
656656
/** Whether the column has a NOT NULL constraint. */
657-
is_not_null?: boolean;
657+
is_required?: boolean;
658658
/** SQL default value expression (e.g., "true", "now()"). */
659659
default_value?: string;
660660
/** Comment/description for this field. */

graphile/node-type-registry/src/codegen/generate-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function buildBlueprintField(): t.ExportNamedDeclaration {
206206
'The PostgreSQL type (e.g., "text", "integer", "boolean", "uuid").'
207207
),
208208
addJSDoc(
209-
optionalProp('is_not_null', t.tsBooleanKeyword()),
209+
optionalProp('is_required', t.tsBooleanKeyword()),
210210
'Whether the column has a NOT NULL constraint.'
211211
),
212212
addJSDoc(

0 commit comments

Comments
 (0)