Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/main/java/graphql/schema/GraphQLUnionType.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ public List<GraphQLNamedOutputType> getTypes() {
* @return true if the object type is a member of this union type.
*/
public boolean isPossibleType(GraphQLObjectType graphQLObjectType) {
return getTypes().stream().anyMatch(nt -> nt.getName().equals(graphQLObjectType.getName()));
for (GraphQLNamedOutputType type : getTypes()) {
if (type.getName().equals(graphQLObjectType.getName())) {
return true;
}
}
return false;
}

// to be removed in a future version when all code is in the code registry
Expand Down
Loading