-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix validation and outdated schema problem #493
Conversation
@@ -223,7 +223,10 @@ object NadelDirectives { | |||
val identifiedByValues = resolveArgumentValue<List<Any>>(inputIdentifiedBy) | |||
val identifiedBy = createObjectIdentifiers(identifiedByValues) | |||
|
|||
val conditionalHydration = buildConditionalHydrationObject(directive.getArgument("when"))?.result | |||
val conditionalHydration = directive.getArgument("when") | |||
?.let { |
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.
Handle case where schema does not define when
and the value is null.
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.
makes sense, thanks for picking it up 👍
) | ||
} | ||
val whenConditionSourceFieldTypeName: String = (whenConditionSourceField.type as GraphQLScalarType).name |
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.
Avoid manual casting. There is a bug where a non-nullable type causes this to crash.
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 fixing this 👍
No description provided.