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

Remove redundant NullValue case in ObjectScalar parseLiteral #71

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

dondonz
Copy link
Member

@dondonz dondonz commented Aug 27, 2022

Inside graphql-java, a NullValue is always coerced into null, see ValuesResolverConversion.literalToInternalValueImpl. This happens before a scalar's parseLiteral method is called.

In other words, a scalar's parseLiteral method never needs to consider NullValue. This PR removes the redundant lines from ObjectScalar.

See further discussion: graphql-java/graphql-java#2904

@dondonz dondonz merged commit 5b55a08 into graphql-java:master Aug 29, 2022
@dondonz dondonz deleted the fix-up-ObjectScalar branch August 29, 2022 00:31
@dondonz dondonz added this to the 19.0 milestone Sep 19, 2022
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