Skip to content

Consolidates the isNonNull and isList for consistency and readability#1095

Merged
bbakerman merged 3 commits into
graphql-java:masterfrom
bbakerman:use-graphqltype-util-where-we-can
Jun 24, 2018
Merged

Consolidates the isNonNull and isList for consistency and readability#1095
bbakerman merged 3 commits into
graphql-java:masterfrom
bbakerman:use-graphqltype-util-where-we-can

Conversation

@bbakerman

Copy link
Copy Markdown
Member

This makes the very common pattern of instanceof X, cast to X and unwrap more readable

@bbakerman bbakerman requested a review from andimarek June 21, 2018 23:05

@andimarek andimarek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice :-)

import java.util.List;
import java.util.Map;

import static graphql.schema.GraphQLTypeUtil.*;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think your formatter settings is not correct :-)
See: https://github.com/graphql-java/graphql-java/blob/master/graphql-java-code-style.xml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

will fix

@andimarek

Copy link
Copy Markdown
Member

SchemaUtil.getUnmodifiedType should be deleted and be replaced with unwrap

…til-where-we-can

# Conflicts:
#	src/main/java/graphql/schema/idl/SchemaGeneratorHelper.java
#	src/main/java/graphql/validation/rules/VariablesTypesMatcher.java
@bbakerman

bbakerman commented Jun 24, 2018

Copy link
Copy Markdown
Member Author

Actually I moved the isLeaf and isInput methods out of SchemaUtil and then its NO longer used by any code

Its @internal and hence we can kill it

I will do that in another PR

@bbakerman bbakerman merged commit 03ae4c2 into graphql-java:master Jun 24, 2018
@bbakerman bbakerman added this to the 10.0 milestone Jun 25, 2018
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