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

Fix validation and outdated schema problem #493

Merged
merged 2 commits into from
Dec 17, 2023
Merged

Fix validation and outdated schema problem #493

merged 2 commits into from
Dec 17, 2023

Conversation

gnawf
Copy link
Collaborator

@gnawf gnawf commented Dec 17, 2023

No description provided.

@@ -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 {
Copy link
Collaborator Author

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.

Copy link
Collaborator

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
Copy link
Collaborator Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for fixing this 👍

@gnawf gnawf merged commit 6fecbb4 into master Dec 17, 2023
2 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