diff --git a/server/implementation/src/main/java/io/smallrye/graphql/bootstrap/Bootstrap.java b/server/implementation/src/main/java/io/smallrye/graphql/bootstrap/Bootstrap.java index f5e57134d..bc54f0225 100644 --- a/server/implementation/src/main/java/io/smallrye/graphql/bootstrap/Bootstrap.java +++ b/server/implementation/src/main/java/io/smallrye/graphql/bootstrap/Bootstrap.java @@ -208,6 +208,7 @@ private void generateGraphQLSchema() { this.graphQLSchema = Federation.transform(rawSchema) .fetchEntities(new FederationDataFetcher(rawSchema.getQueryType(), rawSchema.getCodeRegistry())) .resolveEntityType(fetchEntityType()) + .setFederation2(true) .build(); } else { this.graphQLSchema = schemaBuilder.build(); diff --git a/tools/maven-plugin/src/main/java/io/smallrye/graphql/mavenplugin/GenerateSchemaMojo.java b/tools/maven-plugin/src/main/java/io/smallrye/graphql/mavenplugin/GenerateSchemaMojo.java index e44236590..f6fb2633a 100644 --- a/tools/maven-plugin/src/main/java/io/smallrye/graphql/mavenplugin/GenerateSchemaMojo.java +++ b/tools/maven-plugin/src/main/java/io/smallrye/graphql/mavenplugin/GenerateSchemaMojo.java @@ -256,6 +256,7 @@ private String generateSchema(IndexView index, boolean enableFederation) { graphQLSchema = Federation.transform(graphQLSchema) .fetchEntities(new FederationDataFetcher(graphQLSchema.getQueryType(), graphQLSchema.getCodeRegistry())) .resolveEntityType(fetchEntityType()) + .setFederation2(true) .build(); } if (graphQLSchema != null) {