Skip to content

Commit

Permalink
Fix a compilation problem in the SmallRye GraphQL guide
Browse files Browse the repository at this point in the history
(cherry picked from commit 70781c8)
  • Loading branch information
jmartisk authored and gsmet committed Apr 23, 2024
1 parent 911ac6e commit cfe59bb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/src/main/asciidoc/smallrye-graphql.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit cfe59bb

Please sign in to comment.