-
Notifications
You must be signed in to change notification settings - Fork 172
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
Treat array of non-null scalars as scalars #358
Conversation
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.
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.
Please remove code that is not related to the issue.
@@ -31,6 +31,7 @@ val schemaDefinition = """ | |||
## Private comment! | |||
scalar UUID | |||
scalar customScalarMap | |||
scalar Upload |
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 believe some testing code was left behind in this PR.
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.
The line is related to issue. The scalar is used in 'echoFiles' mutation which is part of the test scenario.
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.
Let me know if there is anything needed.
@oliemansm and @vojtapol Thanks for taking time to review, and merge. |
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.