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
  • Loading branch information
jmartisk committed Apr 22, 2024
1 parent 63170de commit 70781c8
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 70781c8

Please sign in to comment.