From 83d3641da2588028391b3432c79ab0e52201ac74 Mon Sep 17 00:00:00 2001 From: Ruediger zu Dohna Date: Sat, 13 Jan 2024 17:04:54 +0100 Subject: [PATCH] fix #1996: add missing federation directives to index --- .../graphql/entry/http/IndexInitializer.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/implementation-servlet/src/main/java/io/smallrye/graphql/entry/http/IndexInitializer.java b/server/implementation-servlet/src/main/java/io/smallrye/graphql/entry/http/IndexInitializer.java index 44c1fd32e..dec40cb13 100644 --- a/server/implementation-servlet/src/main/java/io/smallrye/graphql/entry/http/IndexInitializer.java +++ b/server/implementation-servlet/src/main/java/io/smallrye/graphql/entry/http/IndexInitializer.java @@ -23,6 +23,11 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; +import io.smallrye.graphql.api.federation.ComposeDirective; +import io.smallrye.graphql.api.federation.Inaccessible; +import io.smallrye.graphql.api.federation.InterfaceObject; +import io.smallrye.graphql.api.federation.Shareable; +import io.smallrye.graphql.api.federation.Tag; import org.jboss.jandex.CompositeIndex; import org.jboss.jandex.IndexReader; import org.jboss.jandex.IndexView; @@ -81,12 +86,18 @@ private IndexView createCustomIndex() { indexer.index(convertClassToInputStream(Entry.class)); indexer.index(convertClassToInputStream(Repeatable.class)); - // things from the API module + // directives from the API module + indexer.index(convertClassToInputStream(ComposeDirective.class)); indexer.index(convertClassToInputStream(Extends.class)); indexer.index(convertClassToInputStream(External.class)); + indexer.index(convertClassToInputStream(Inaccessible.class)); + indexer.index(convertClassToInputStream(InterfaceObject.class)); indexer.index(convertClassToInputStream(Key.class)); + indexer.index(convertClassToInputStream(Override.class)); indexer.index(convertClassToInputStream(Provides.class)); indexer.index(convertClassToInputStream(Requires.class)); + indexer.index(convertClassToInputStream(Shareable.class)); + indexer.index(convertClassToInputStream(Tag.class)); } catch (IOException ex) { throw new RuntimeException(ex); }