Skip to content

Treat array of non-null scalars as scalars #358

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

Merged
merged 2 commits into from
Jan 30, 2020

Conversation

adisesha
Copy link
Contributor

This is fix for #240, and test for same issue.

When array of non-nullable scalars is input, an error is thrown from Jackson ObjectMapper. The problem then was, NonNullType was ignored by MethodFieldResolver.isScalarType. Changes in #342 handles NonNullType but it doesn't handle NonNullType.type is ListType.

This is fix for graphql-java-kickstart#240, and test for same issue.

When array of non-nullable scalars is input, an error is thrown from Jackson ObjectMapper. The problem then was, NonNullType was ignored by MethodFieldResolver.isScalarType. Changes in graphql-java-kickstart#342 handles NonNullType but it doesn't handle NonNullType.type is ListType.
@adisesha adisesha requested a review from oliemansm January 22, 2020 13:05
Copy link
Member

@vojtapol vojtapol left a comment

Choose a reason for hiding this comment

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

Please remove code that is not related to the issue.

@@ -31,6 +31,7 @@ val schemaDefinition = """
## Private comment!
scalar UUID
scalar customScalarMap
scalar Upload
Copy link
Member

Choose a reason for hiding this comment

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

I believe some testing code was left behind in this PR.

Copy link
Contributor Author

@adisesha adisesha Jan 27, 2020

Choose a reason for hiding this comment

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

The line is related to issue. The scalar is used in 'echoFiles' mutation which is part of the test scenario.

Copy link
Contributor Author

@adisesha adisesha Jan 30, 2020

Choose a reason for hiding this comment

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

Let me know if there is anything needed.

@oliemansm oliemansm added this to the 6.0.0 milestone Jan 30, 2020
@oliemansm oliemansm merged commit 229e56b into graphql-java-kickstart:master Jan 30, 2020
@adisesha adisesha deleted the non-nullable-scalar branch February 3, 2020 06:29
@adisesha
Copy link
Contributor Author

adisesha commented Feb 3, 2020

@oliemansm and @vojtapol Thanks for taking time to review, and merge.

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.

3 participants