feat(node-type-registry): add source_field/target_field to RelationSpatial BlueprintRelation arm (v0.15.0)#1001
Merged
pyramation merged 1 commit intomainfrom Apr 18, 2026
Conversation
…atial BlueprintRelation arm (v0.15.0)
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
source_fieldandtarget_field(required, string) to theRelationSpatialarm of the generatedBlueprintRelationunion so blueprint authors can write aRelationSpatialentry without casting through a local interface.Why:
RelationSpatialis the only relation node that references existing columns (rather than creating FK/junction columns). Its parameter_schema is in ID-space (source_field_id,target_field_idas UUIDs), but blueprint JSON is in name-space (source_field,target_fieldas strings, resolved server-side byresolve_blueprint_field). Those name-space fields had no equivalent inRelationSpatialParams, so the generatedBlueprintRelationarm was missing them — forcing downstream consumers (e.g. agentic-db) to define a localSpatialRelationEntryinterface andas unknown as BlueprintRelation[]cast.Changes:
codegen/generate-types.ts—buildRelationTypesnow appendssource_field/target_fieldrequired props to the union arm whennt.name === 'RelationSpatial'.blueprint-types.generated.ts— regenerated output with the two new required fields on theRelationSpatialarm.package.json— version bump0.14.0→0.15.0.Follow-up (separate PR, agentic-db): bump this dep and drop the local
SpatialRelationEntrycast.Review & Testing Checklist for Human
RelationSpatialarm — any existing blueprint that constructed aRelationSpatialentry withoutsource_field/target_fieldwill now fail type-check. In practice those fields were already required at runtime (the server-side dispatcher reads them), so this just surfaces an existing requirement. Confirm no other consumer constructsRelationSpatialentries that would regress.blueprint-types.generated.tsrenders the JSDoc comments inline with the property (/** ... */source_field: string;) rather than on the line above. This is valid TS and matches what@babel/generatoremits for leading comments onTSTypeElements inside a type literal, but if you'd prefer the comments above the props I can switch to plain block comments (/* ... */) like therequiredPropcomments inBlueprintFullTextSearch.if (nt.name === 'RelationSpatial')) vs. a more extensible mechanism (e.g. ablueprint_json_extra_fieldskey onNodeTypeDefinition). I went with the special-case because RelationSpatial is the only node today that needs name-space-only blueprint fields; happy to generalize if you'd rather.Notes
pnpm run generate:typeslocally; output matches the committedblueprint-types.generated.ts.graphql/node-type-registry/— relying on CI + downstream consumers (agentic-db follow-up PR) for validation.Link to Devin session: https://app.devin.ai/sessions/c5eeee65a3c546c4ac6753bb05fa03e0
Requested by: @pyramation