We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a04e677 commit 60d5a0aCopy full SHA for 60d5a0a
src/main/java/graphql/schema/GraphQLUnionType.java
@@ -96,7 +96,12 @@ public List<GraphQLNamedOutputType> getTypes() {
96
* @return true if the object type is a member of this union type.
97
*/
98
public boolean isPossibleType(GraphQLObjectType graphQLObjectType) {
99
- return getTypes().stream().anyMatch(nt -> nt.getName().equals(graphQLObjectType.getName()));
+ for (GraphQLNamedOutputType type : getTypes()) {
100
+ if (type.getName().equals(graphQLObjectType.getName())) {
101
+ return true;
102
+ }
103
104
+ return false;
105
}
106
107
// to be removed in a future version when all code is in the code registry
0 commit comments