diff --git a/docs/src/main/asciidoc/smallrye-graphql.adoc b/docs/src/main/asciidoc/smallrye-graphql.adoc index 01284ee079384..9537d30858049 100644 --- a/docs/src/main/asciidoc/smallrye-graphql.adoc +++ b/docs/src/main/asciidoc/smallrye-graphql.adoc @@ -721,17 +721,18 @@ public class Film implements SearchResult { // ... } -public class Hero implements Character, SearchResult { +public interface Character implements SearchResult { // ... } -public class Ally implements Character, SearchResult { +public class Hero implements Character { // ... } ----- -TIP: We can also leverage inheritance and have `interface Character extends SearchResult`. -This will result in all implementations of `Character` being added as members of the `SearchResult` union in the schema. +public class Ally implements Character { + // ... +} +---- Update `GalaxyService` to provide search: