Skip to content

Conversation

@AmirLayegh
Copy link

@AmirLayegh AmirLayegh commented Dec 10, 2025

Description

  • New ConstraintType model: Represents constraints on nodes with type, node_type, and property_name fields
  • Updated GraphSchema: Added constraints field and validator to ensure constraints reference valid node types
  • Updated SchemaBuilder: create_schema_model() and run() now accept optional constraints parameter
  • Updated SchemaFromTextExtractor: Extracts and filters constraints from LLM response
  • Updated SchemaExtractionTemplate: Prompt instructs LLM to generate UNIQUENESS constraints

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Complexity: Medium

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • Manual tests

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated
  • Examples have been updated
  • New files have copyright header
  • CLA (https://neo4j.com/developer/cla/) has been signed
  • CHANGELOG.md updated if appropriate

@AmirLayegh AmirLayegh force-pushed the feature/add-constraint-type branch from eaace4c to 34b8eff Compare December 11, 2025 13:18
@AmirLayegh AmirLayegh force-pushed the feature/add-constraint-type branch from 34b8eff to f3186ac Compare December 11, 2025 13:43
@AmirLayegh AmirLayegh changed the title Feature/add constraint type GENKGB-412 Dec 15, 2025
@AmirLayegh AmirLayegh marked this pull request as ready for review December 15, 2025 14:38
@AmirLayegh AmirLayegh requested a review from a team as a code owner December 15, 2025 14:38
Copy link
Contributor

@stellasia stellasia left a comment

Choose a reason for hiding this comment

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

Nice work and great test coverage! Left a few comments, happy to get your opinion on them.

description: str = ""
required: bool = False

# unique: bool = False
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this can be removed?

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.

3 participants