Skip to content
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

Validation rules refactor and included new errors for when the directive node is expected but missing #5963

Merged
merged 19 commits into from
Jan 29, 2025

Conversation

MacondoExpress
Copy link
Contributor

@MacondoExpress MacondoExpress commented Jan 27, 2025

As title, this PR refactor the way how the validation are done.
The previous validation functions associated with each directive are now moved to their own Rule per directive.
It also includes a list of new rules for when the @node directive is expected but missing, for instance, when a directive expected to be used within a @node type is found but the @node directive is not.

Nice follow-ups (out of the scope of PR).

  • The list of directives tested was increased but is still not comprehensive; for instance, no validation rules were present for the Vector directive.

  • The new errors include invalid usage when the @node directive is not found. However, it does not cover cases when the type of a field is expected to reference an Object type that contains the @node directive; This could be particularly useful for identifying mistakes when the @relationship and @cypher target is not annotated as a @node.

Copy link

changeset-bot bot commented Jan 27, 2025

⚠️ No Changeset found

Latest commit: d260966

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@MacondoExpress MacondoExpress merged commit b1698b8 into neo4j:7.x Jan 29, 2025
37 checks passed
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.

2 participants