From 70781c827ab93539a63f692d7c15ddc6403ef453 Mon Sep 17 00:00:00 2001 From: Jan Martiska Date: Mon, 22 Apr 2024 13:59:37 +0200 Subject: [PATCH] Fix a compilation problem in the SmallRye GraphQL guide --- docs/src/main/asciidoc/smallrye-graphql.adoc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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: