-
Notifications
You must be signed in to change notification settings - Fork 153
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
Validation rules refactor and included new errors for when the directive node is expected but missing #5963
Conversation
…pes annotated with the node node directive, added the nodeMissingValidation to the validation rules
|
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
.