Skip to content

feat: update RelationManyToMany types - replace node_type/node_data with nodes[] array#943

Merged
pyramation merged 1 commit intomainfrom
devin/1774989173-nodes-column-types
Apr 1, 2026
Merged

feat: update RelationManyToMany types - replace node_type/node_data with nodes[] array#943
pyramation merged 1 commit intomainfrom
devin/1774989173-nodes-column-types

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

Updates the RelationManyToMany node type definition and generated blueprint types to replace the single node_type (string) + node_data (object) parameters with a nodes array of objects. Each object in the array has a $type key identifying the generator (e.g. DataId, DataEntityMembership) plus optional data keys.

This matches the DB schema change in constructive-db PR #723, which redesigns relation_provision.node_type/node_data columns into a single nodes jsonb column.

Files changed:

  • graphql/node-type-registry/src/relation/relation-many-to-many.ts — source definition
  • graphql/node-type-registry/src/blueprint-types.generated.ts — regenerated via pnpm generate:types

Review & Testing Checklist for Human

  • Verify nodes type shape matches DB expectation: The generated TS type is { [key: string]: unknown }[] — it does NOT enforce $type at the type level (the codegen derives from the JSON Schema "type": "array", "items": { "type": "object" }). Confirm this is acceptable or if the schema should be tightened to require $type.
  • Merge alongside constructive-db PR fix: remove double quotes from pgpm env output #723: These two PRs are companions — merging one without the other will cause type/schema mismatch. Merge constructive-db first, then this.

Notes

  • This is a breaking change — any code referencing node_type or node_data on RelationManyToManyParams will fail to compile. This is intentional (pre-launch, no backward compat).
  • The generated file was produced by running pnpm generate:types in graphql/node-type-registry/, not hand-edited.

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

…ith nodes[] array

Matches constructive-db PR #723 which redesigns secure_table_provision and
relation_provision to use a nodes jsonb array instead of separate node_type/node_data columns.
@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

@pyramation pyramation merged commit f7bfaab into main Apr 1, 2026
44 checks passed
@pyramation pyramation deleted the devin/1774989173-nodes-column-types branch April 1, 2026 05:07
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