diff --git a/server/implementation/src/main/java/io/smallrye/graphql/bootstrap/FederationDataFetcher.java b/server/implementation/src/main/java/io/smallrye/graphql/bootstrap/FederationDataFetcher.java index 43d14724a..312a90285 100644 --- a/server/implementation/src/main/java/io/smallrye/graphql/bootstrap/FederationDataFetcher.java +++ b/server/implementation/src/main/java/io/smallrye/graphql/bootstrap/FederationDataFetcher.java @@ -11,6 +11,7 @@ import java.util.Objects; import java.util.Set; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.Collectors; @@ -39,7 +40,7 @@ public class FederationDataFetcher implements DataFetcher cache = new HashMap<>(); + private final ConcurrentHashMap cache = new ConcurrentHashMap<>(); public FederationDataFetcher(GraphQLObjectType queryType, GraphQLCodeRegistry codeRegistry) { this.queryType = queryType;