File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
graphql-java-support/src/main/java/com/apollographql/federation/graphqljava Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ private static RuntimeWiring ensureFederationV2DirectiveDefinitionsExist(
161
161
importedDefinitions .forEach (
162
162
def -> {
163
163
if (def instanceof DirectiveDefinition
164
- && ! typeRegistry .getDirectiveDefinition (def .getName ()).isPresent ()) {
164
+ && typeRegistry .getDirectiveDefinition (def .getName ()).isEmpty ()) {
165
165
typeRegistry .add (def );
166
166
} else if (def instanceof ScalarTypeDefinition ) {
167
167
if (!typeRegistry .scalars ().containsKey (def .getName ())) {
@@ -193,11 +193,11 @@ private static RuntimeWiring ensureFederationDirectiveDefinitionsExist(
193
193
194
194
// Add Federation directives if they don't exist.
195
195
FederationDirectives .federation1DirectiveDefinitions .stream ()
196
- .filter (def -> ! typeRegistry .getDirectiveDefinition (def .getName ()).isPresent ())
196
+ .filter (def -> typeRegistry .getDirectiveDefinition (def .getName ()).isEmpty ())
197
197
.forEachOrdered (typeRegistry ::add );
198
198
199
199
// Add scalar type for _FieldSet, since the directives depend on it.
200
- if (! typeRegistry .getType (_FieldSet .typeName ).isPresent ()) {
200
+ if (typeRegistry .getType (_FieldSet .typeName ).isEmpty ()) {
201
201
typeRegistry .add (_FieldSet .definition );
202
202
}
203
203
You can’t perform that action at this time.
0 commit comments