Skip to content

fix(node-type-registry): BlueprintField uses is_required, not is_not_null#910

Merged
pyramation merged 1 commit intomainfrom
devin/1774565430-fix-blueprint-field-is-required
Mar 27, 2026
Merged

fix(node-type-registry): BlueprintField uses is_required, not is_not_null#910
pyramation merged 1 commit intomainfrom
devin/1774565430-fix-blueprint-field-is-required

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

@pyramation pyramation commented Mar 26, 2026

Summary

Fixes the BlueprintField generated type to use is_required instead of is_not_null for the NOT NULL constraint flag.

The construct_blueprint() SQL function passes field JSONB objects directly into secure_table_provision, which reads the "is_required" key (per its column comment). The metaschema_public.field table also uses is_required. The is_not_null name only exists in the low-level PostgreSQL AST package (ColumnDef parse tree nodes) — a completely different layer.

Changes:

  • generate-types.ts: optionalProp('is_not_null', ...)optionalProp('is_required', ...)
  • blueprint-types.generated.ts: regenerated (single field rename)

Review & Testing Checklist for Human

  • Confirm that construct_blueprint() and secure_table_provision read is_required (not is_not_null) from field JSONB — check the column comment on secure_table_provision.fields and the metaschema.create_field() function
  • If any downstream consumer (e.g. agentic-db) already adopted is_not_null from the previous publish, those will need updating too

Notes

Link to Devin session: https://app.devin.ai/sessions/ce1b2dafd42341bea5d7793b0c05ba6c
Requested by: @pyramation


Open with Devin

…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).
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

),
addJSDoc(
optionalProp('is_not_null', t.tsBooleanKeyword()),
optionalProp('is_required', t.tsBooleanKeyword()),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 README example uses stale is_not_null property after rename to is_required

The PR renames BlueprintField.is_not_null to is_required in generate-types.ts:209 and the generated output, but the README.md example at graphile/node-type-registry/README.md:42 still uses { name: 'title', type: 'text', is_not_null: true }. Users copying the README example will silently get no NOT NULL constraint on the column, since is_not_null is now an unrecognized property that TypeScript will flag (or silently ignore in plain JSONB usage).

Prompt for agents
Update graphile/node-type-registry/README.md line 42 to use the new property name: change `{ name: 'title', type: 'text', is_not_null: true }` to `{ name: 'title', type: 'text', is_required: true }` to match the renamed BlueprintField property in generate-types.ts:209.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@pyramation pyramation merged commit 6ce57ba into main Mar 27, 2026
43 checks passed
@pyramation pyramation deleted the devin/1774565430-fix-blueprint-field-is-required branch March 27, 2026 11:19
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