-
Notifications
You must be signed in to change notification settings - Fork 260
Adding validation to disallow multiple relationships between same source and target entities #1929
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
Adding validation to disallow multiple relationships between same source and target entities #1929
Conversation
…rce and target entities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this particular validation can be added directly to the main
branch.
Also, would this validation run as part of dab validate
command?
It will run both for start and validate command |
need clarification on some questions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, 1 question and a nit
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for addressing comments.
This PR was not to be merged yet. I and @Aniruddh25 had a discussion around this where we decided that throwing an exception at the startup would not be ideal. Rather, we will throw an exception during request execution. As for startup, a warning would suffice. |
Why make this change?
Currently, we allow defining multiple relationships between the same source and target entities. A user is allowed to define multiple relationships each with different source fields/target fields and even different cardinalities. This is not only logically incorrect and difficult to make sense out of, but will also pose a problem in the functioning of nested mutations.
What is this change?
Added the above explained validation in
development
mode whenGraphQL is enabled
for the source entity..How was this tested?
RuntimeConfigValidator.TestMultipleRelationshipsBetweenSourceAndTargetEntities
.