Skip to content

Commit cfe59bb

Browse files
jmartiskgsmet
authored andcommitted
Fix a compilation problem in the SmallRye GraphQL guide
(cherry picked from commit 70781c8)
1 parent 911ac6e commit cfe59bb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/src/main/asciidoc/smallrye-graphql.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,17 +721,18 @@ public class Film implements SearchResult {
721721
// ...
722722
}
723723
724-
public class Hero implements Character, SearchResult {
724+
public interface Character implements SearchResult {
725725
// ...
726726
}
727727
728-
public class Ally implements Character, SearchResult {
728+
public class Hero implements Character {
729729
// ...
730730
}
731-
----
732731
733-
TIP: We can also leverage inheritance and have `interface Character extends SearchResult`.
734-
This will result in all implementations of `Character` being added as members of the `SearchResult` union in the schema.
732+
public class Ally implements Character {
733+
// ...
734+
}
735+
----
735736

736737
Update `GalaxyService` to provide search:
737738

0 commit comments

Comments
 (0)