Skip to content

Strict mode behavior #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 20, 2025
Merged

Conversation

stellasia
Copy link
Contributor

@stellasia stellasia commented May 9, 2025

Description

  • If no properties or relationships are provided in the schema, do not prune them.
    • For relationships, users can still provide an empty list that will prune all relationships. If they do not want any pruning, relationships has to be set to None in the schema (default value)
  • Keep removing nodes with no properties at all

Type of Change

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

Complexity

Note

Please provide an estimated complexity of this PR of either Low, Medium or High

Complexity:

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

Copy link
Contributor

@NathalieCharbel NathalieCharbel left a comment

Choose a reason for hiding this comment

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

LGTM!

just one thing that just crossed my mind: in the future, if we would like to extend SchemaEnforcementMode to "OPEN" meaning that only listed entities, props and rels in schema will be enforced and everything that is beyond that is accepted, will the user be confused since the behaviour will be same as "STRICT" for props and rels?

@stellasia stellasia force-pushed the fix/strict-mode-graph-empty branch from 4f46e93 to 22a0831 Compare May 13, 2025 11:45
@stellasia stellasia marked this pull request as ready for review May 13, 2025 11:48
@stellasia stellasia requested a review from a team as a code owner May 13, 2025 11:48
@stellasia stellasia requested a review from NathalieCharbel May 13, 2025 11:52
@stellasia stellasia marked this pull request as draft May 13, 2025 13:38
@stellasia
Copy link
Contributor Author

Blocked until further discussion about @NathalieCharbel's comment

@stellasia stellasia marked this pull request as ready for review May 15, 2025 17:27
Copy link
Member

@oskarhane oskarhane left a comment

Choose a reason for hiding this comment

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

I think this change aligns with users expectations 👍

@stellasia stellasia force-pushed the fix/strict-mode-graph-empty branch from 22a0831 to b9d26da Compare May 20, 2025 10:40
@stellasia stellasia merged commit 9b8b8e8 into neo4j:main May 20, 2025
7 checks passed
@stellasia stellasia deleted the fix/strict-mode-graph-empty branch May 21, 2025 19:29
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